diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-06 18:37:30 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-06 18:37:30 +0200 |
commit | b18b04c8a832148fb47aec20ce1e74267d2fb438 (patch) | |
tree | 6c00fdb3493540284c39a032dde3fabec79e2df7 /shell | |
parent | cafb2d195d4d68e4e4c474453409a69643edf5aa (diff) | |
download | busybox-b18b04c8a832148fb47aec20ce1e74267d2fb438.tar.gz |
shell: remove duplicate sigint1.tests (another copies are in signals/)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash_test/ash-misc/sigint1.right | 1 | ||||
-rwxr-xr-x | shell/ash_test/ash-misc/sigint1.tests | 41 | ||||
-rw-r--r-- | shell/hush_test/hush-misc/sigint1.right | 1 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/sigint1.tests | 41 |
4 files changed, 0 insertions, 84 deletions
diff --git a/shell/ash_test/ash-misc/sigint1.right b/shell/ash_test/ash-misc/sigint1.right deleted file mode 100644 index a9094b056..000000000 --- a/shell/ash_test/ash-misc/sigint1.right +++ /dev/null @@ -1 +0,0 @@ -Sending SIGINT to main shell PID diff --git a/shell/ash_test/ash-misc/sigint1.tests b/shell/ash_test/ash-misc/sigint1.tests deleted file mode 100755 index 3d483d32a..000000000 --- a/shell/ash_test/ash-misc/sigint1.tests +++ /dev/null @@ -1,41 +0,0 @@ -# What should happen if non-interactive shell gets SIGINT? - -(sleep 1; echo Sending SIGINT to main shell PID; exec kill -INT $$) & - -# We create a child which exits with 0 even on SIGINT -# (The complex command is necessary only if SIGINT is generated by ^C, -# in this testcase even bare "sleep 2" would do because -# in the testcase we don't send SIGINT *to the child*...) -$THIS_SH -c 'trap "exit 0" SIGINT; sleep 2' - -# In one second, we (main shell) get SIGINT here. -# The question is whether we should, or should not, exit. - -# bash will not stop here. It will execute next command(s). - -# The rationale for this is described here: -# http://www.cons.org/cracauer/sigint.html -# -# Basically, bash will not exit on SIGINT immediately if it waits -# for a child. It will wait for the child to exit. -# If child exits NOT by dying on SIGINT, then bash will not exit. -# -# The idea is that the following script: -# | emacs file.txt -# | more cmds -# User may use ^C to interrupt editor's ops like search. But then -# emacs exits normally. User expects that script doesn't stop. -# -# This is a nice idea, but detecting "did process really exit -# with SIGINT?" is racy. Consider: -# | bash -c 'while true; do /bin/true; done' -# When ^C is pressed while bash waits for /bin/true to exit, -# it may happen that /bin/true exits with exitcode 0 before -# ^C is delivered to it as SIGINT. bash will see SIGINT, then -# it will see that child exited with 0, and bash will NOT EXIT. - -# Therefore we do not implement bash behavior. -# I'd say that emacs need to put itself into a separate pgrp -# to isolate shell from getting stray SIGINTs from ^C. - -echo Next command after SIGINT was executed diff --git a/shell/hush_test/hush-misc/sigint1.right b/shell/hush_test/hush-misc/sigint1.right deleted file mode 100644 index a9094b056..000000000 --- a/shell/hush_test/hush-misc/sigint1.right +++ /dev/null @@ -1 +0,0 @@ -Sending SIGINT to main shell PID diff --git a/shell/hush_test/hush-misc/sigint1.tests b/shell/hush_test/hush-misc/sigint1.tests deleted file mode 100755 index 3d483d32a..000000000 --- a/shell/hush_test/hush-misc/sigint1.tests +++ /dev/null @@ -1,41 +0,0 @@ -# What should happen if non-interactive shell gets SIGINT? - -(sleep 1; echo Sending SIGINT to main shell PID; exec kill -INT $$) & - -# We create a child which exits with 0 even on SIGINT -# (The complex command is necessary only if SIGINT is generated by ^C, -# in this testcase even bare "sleep 2" would do because -# in the testcase we don't send SIGINT *to the child*...) -$THIS_SH -c 'trap "exit 0" SIGINT; sleep 2' - -# In one second, we (main shell) get SIGINT here. -# The question is whether we should, or should not, exit. - -# bash will not stop here. It will execute next command(s). - -# The rationale for this is described here: -# http://www.cons.org/cracauer/sigint.html -# -# Basically, bash will not exit on SIGINT immediately if it waits -# for a child. It will wait for the child to exit. -# If child exits NOT by dying on SIGINT, then bash will not exit. -# -# The idea is that the following script: -# | emacs file.txt -# | more cmds -# User may use ^C to interrupt editor's ops like search. But then -# emacs exits normally. User expects that script doesn't stop. -# -# This is a nice idea, but detecting "did process really exit -# with SIGINT?" is racy. Consider: -# | bash -c 'while true; do /bin/true; done' -# When ^C is pressed while bash waits for /bin/true to exit, -# it may happen that /bin/true exits with exitcode 0 before -# ^C is delivered to it as SIGINT. bash will see SIGINT, then -# it will see that child exited with 0, and bash will NOT EXIT. - -# Therefore we do not implement bash behavior. -# I'd say that emacs need to put itself into a separate pgrp -# to isolate shell from getting stray SIGINTs from ^C. - -echo Next command after SIGINT was executed |