Update of /cvsroot/sbcl/sbcl/tests
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11126/tests
184.108.40.206: SIGCHLD related fixes
- WITH-ACTIVE-PROCESSES-LOCK does not allow WITH-INTERRUPTS because
that can lead to recursive lock attempts upon receiving a SIGCHLD.
- if fork() in RUN-PROGRAM fails, signal the error outside the lock.
- the SIGCHLD handler only reaps processes started by RUN-PROGRAM in
order not to interfere with SB-POSIX:WAIT, SB-POSIX:WAITPID and
their C equivalents (thanks to James Y Knight).
- the SIGCHLD handler is installed once at startup, because on Darwin
sigaction() seems to do unexpected things to the current sigmask.
RCS file: /cvsroot/sbcl/sbcl/tests/run-program.impure.lisp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- run-program.impure.lisp 31 Jan 2008 19:29:25 -0000 1.6
+++ run-program.impure.lisp 24 Apr 2009 13:32:42 -0000 1.7
@@ -120,3 +120,18 @@
:search t :wait t)))
+;;; This used to crash on Darwin and trigger recursive lock errors on
+;;; every platform.
+(with-test (:name (:run-program :stress))
+ ;; Do it a hundred times in batches of 10 so that with a low limit
+ ;; of the number of processes the test can have a chance to pass.
+ repeat 10 do
+ (map nil
+ (loop repeat 10
+ (sb-ext:run-program "/bin/echo" '
+ ("It would be nice if this didn't crash.")
+ :wait nil :output nil)))))