diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2006-03-03 22:09:58 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2006-03-03 22:09:58 +0000 |
commit | 862c974d7cbb31c6b4e75163a2b61c85a268542b (patch) | |
tree | b333a98a899889ebf911312ac69098d6800edcac | |
parent | 31f6b3fb07ec0d5816c2dabbc314009c3126b58b (diff) | |
download | zsh-862c974d7cbb31c6b4e75163a2b61c85a268542b.tar.gz zsh-862c974d7cbb31c6b4e75163a2b61c85a268542b.tar.xz zsh-862c974d7cbb31c6b4e75163a2b61c85a268542b.zip |
22277: missed bit
-rw-r--r-- | Test/C03traps.ztst | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Test/C03traps.ztst b/Test/C03traps.ztst index ffaa70204..82e401fd1 100644 --- a/Test/C03traps.ztst +++ b/Test/C03traps.ztst @@ -253,6 +253,40 @@ >Exiting, attempt 2 >Running exit trap + print Another test that takes three seconds >&8 + gotsig=0 + signal_handler() { + echo "parent received signal" + gotsig=1 + } + child() { + sleep 1 + echo "child sending signal" + kill -15 $parentpid + sleep 2 + echo "child exiting" + exit 33 + } + parentpid=$$ + child & + childpid=$! + trap signal_handler 15 + echo "parent waiting" + wait $childpid + cstatus=$? + echo "wait #1 finished, gotsig=$gotsig, status=$cstatus" + gotsig=0 + wait $childpid + cstatus=$? + echo "wait #2 finished, gotsig=$gotsig, status=$cstatus" +0:waiting for trapped signal +>parent waiting +>child sending signal +>parent received signal +>wait #1 finished, gotsig=1, status=143 +>child exiting +>wait #2 finished, gotsig=0, status=33 + %clean rm -f TRAPEXIT |