summaryrefslogtreecommitdiff
path: root/tests/run.scm
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2017-11-10 21:08:02 +0100
committerPeter Bex <peter@more-magic.net>2017-11-10 21:08:02 +0100
commit4e420e4d032b550fa6e0193a3bbf04f4db76cc8b (patch)
tree20f69ee7411a93bb6868d04ac5427a8d23eb0cbd /tests/run.scm
parenta29a4e79aa00d697a564cb3bd7f1f78d7e5d7245 (diff)
downloadscsh-process-4e420e4d032b550fa6e0193a3bbf04f4db76cc8b.tar.gz
Also unmask (if needed) sigchld in the child process thunk
This would be otherwise kept in masked mode because the thunk is in the dynamic extent of the dynamic-wind.
Diffstat (limited to 'tests/run.scm')
-rw-r--r--tests/run.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/run.scm b/tests/run.scm
index f4409fd..f05d643 100644
--- a/tests/run.scm
+++ b/tests/run.scm
@@ -32,8 +32,21 @@
(test-assert "signal wasn't unmasked" (signal-masked? signal/chld))
+ (test "sigchld is masked inside child process"
+ "yes"
+ (run/string*
+ (lambda ()
+ (display (if (signal-masked? signal/chld) "yes" "no")))))
+
(signal-unmask! signal/chld)
+ (test "after unmasking, sigchld is also unmasked inside child process"
+ "yes"
+ (run/string*
+ (lambda ()
+ (display (if (signal-masked? signal/chld) "no" "yes")))))
+
+
;; Reported by Haochi Kiang
(test "run/string* does not redirect stderr"
'("This should go to stdout" "")