diff options
Diffstat (limited to 'tests/run.scm')
-rw-r--r-- | tests/run.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run.scm b/tests/run.scm index 85a6b11..ed4f653 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -4,6 +4,7 @@ (import (scheme base) (scheme write) (scheme read) (chicken base) (chicken port) (chicken condition) (chicken io) (chicken file) (chicken file posix) + (chicken process) (chicken process signal) srfi-18 test) (import scsh-process) @@ -44,6 +45,17 @@ (receive (status2 ok?2 pid2) (wait p) (list (eq? status status2) (eq? ok? ok?2) (or (eq? pid pid2) (list pid pid2))))))) + (let ((p (process-fork (lambda () (sleep 1))))) + (test "after forking via native process-fork, waiting for \"any\" next process still returns the status" + (list 0 #t (process-id p)) + (call-with-values (lambda () (wait #f)) list))) + + ;; Regression test for bug reported by Matt Welland (this broke w/ poule) + (let ((pid (process-fork (lambda () (sleep 1))))) + (test "after forking via native process-fork, waiting for the specific process by pid still returns the status" + (list 0 #t (process-id pid)) + (call-with-values (lambda () (wait (process-id pid))) list))) + (test-assert "signal wasn't unmasked" (signal-masked? signal/chld)) (test "sigchld is masked inside child process" |