From 4e19a9c81a6e0b0608fcae1f1a5adbaa1893a17d Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 26 Jul 2008 13:45:57 +0000 Subject: ash: hopefully close bug 4324. With testcase. function old new delta evaltree 621 869 +248 popstring 134 140 +6 --- shell/ash_test/ash-signals/signal2.right | 3 +++ shell/ash_test/ash-signals/signal2.tests | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 shell/ash_test/ash-signals/signal2.right create mode 100755 shell/ash_test/ash-signals/signal2.tests (limited to 'shell/ash_test/ash-signals') diff --git a/shell/ash_test/ash-signals/signal2.right b/shell/ash_test/ash-signals/signal2.right new file mode 100644 index 000000000..96d2d6ad3 --- /dev/null +++ b/shell/ash_test/ash-signals/signal2.right @@ -0,0 +1,3 @@ +sleeping +child exits as expected +parent exits diff --git a/shell/ash_test/ash-signals/signal2.tests b/shell/ash_test/ash-signals/signal2.tests new file mode 100755 index 000000000..04f981c2d --- /dev/null +++ b/shell/ash_test/ash-signals/signal2.tests @@ -0,0 +1,18 @@ +#!/bin/sh + +$THIS_SH -c ' +cleanup() { + echo "child exits as expected" + exit +} +trap cleanup HUP +echo "sleeping" +sleep 1 +echo "BAD exit from child!" +' & + +child=$! +sleep 0.1 # let child install handler first +kill -HUP $child +wait +echo "parent exits" -- cgit v1.2.3