2024-04-12 18:19:32 +08:00
|
|
|
#RUN: %fish -C "set -g helper %fish_test_helper; set -g fish %fish" %s
|
2019-10-16 13:33:53 +08:00
|
|
|
|
2020-08-11 03:26:30 +08:00
|
|
|
# Check that nohup is propagated.
|
|
|
|
set output_path (mktemp)
|
|
|
|
nohup $fish -c "$helper print_ignored_signals" 2>&1 > $output_path
|
|
|
|
cat $output_path
|
|
|
|
# CHECK: Hangup: 1
|
|
|
|
rm $output_path
|
2020-04-05 16:24:26 +08:00
|
|
|
|
2020-08-11 03:26:30 +08:00
|
|
|
# Block some signals if job control is off (#6828).
|
2020-04-05 16:24:26 +08:00
|
|
|
status job-control none
|
|
|
|
for fish_use_posix_spawn in 0 1
|
|
|
|
$helper print_blocked_signals &
|
|
|
|
wait
|
|
|
|
end
|
|
|
|
# CHECKERR: Interrupt: 2
|
|
|
|
# CHECKERR: Quit: 3
|
|
|
|
# CHECKERR: Interrupt: 2
|
|
|
|
# CHECKERR: Quit: 3
|
|
|
|
|
2019-10-16 13:33:53 +08:00
|
|
|
# Ensure we can break from a while loop.
|
|
|
|
|
|
|
|
echo About to sigint
|
|
|
|
$helper sigint_parent &
|
2020-01-14 03:34:22 +08:00
|
|
|
while true
|
|
|
|
end
|
2019-10-16 13:33:53 +08:00
|
|
|
echo I should not be printed because I got sigint
|
|
|
|
|
|
|
|
#CHECK: About to sigint
|
|
|
|
#CHECKERR: Sent SIGINT to {{\d*}}
|