From: Richard M Kreuter Date: Fri, 21 Dec 2007 00:42:23 +0000 (+0000) Subject: 1.0.12.42: Fix minor regression in RUN-PROGRAM on win32 X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=4721c800154f80478023a77a530d64cbfaf50901;p=sbcl.git 1.0.12.42: Fix minor regression in RUN-PROGRAM on win32 * Recent RUN-PROGRAM changes allowed strange errors in SBCL when a child exited with a random negative exit status (e.g., when the child crashes). --- diff --git a/src/code/run-program.lisp b/src/code/run-program.lisp index b1331de..e1ab659 100644 --- a/src/code/run-program.lisp +++ b/src/code/run-program.lisp @@ -760,7 +760,7 @@ Users Manual for details about the PROCESS structure."#-win32" (if search 1 0) environment-vec pty-name (if wait 1 0))))) - (when (minusp child) + (when (= child -1) (error "couldn't fork child process: ~A" (strerror))) (setf proc (apply @@ -787,6 +787,7 @@ Users Manual for details about the PROCESS structure."#-win32" #-win32 (dolist (handler *handlers-installed*) (sb-sys:remove-fd-handler handler)))) + #-win32 (when (and wait proc) (process-wait proc)) proc))) diff --git a/src/runtime/run-program.c b/src/runtime/run-program.c index 303b280..6b7575c 100644 --- a/src/runtime/run-program.c +++ b/src/runtime/run-program.c @@ -190,9 +190,9 @@ HANDLE spawn ( /* Spawn process given on the command line*/ if (search) - hProcess = (HANDLE) spawnvp ( wait_mode, program, argv ); + hProcess = (HANDLE) spawnvp ( wait_mode, program, argv ); else - hProcess = (HANDLE) spawnv ( wait_mode, program, argv ); + hProcess = (HANDLE) spawnv ( wait_mode, program, argv ); /* Now that the process is launched, replace the original * in/out/err handles and close the backups. */ diff --git a/version.lisp-expr b/version.lisp-expr index aa28180..e5f080e 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.12.41" +"1.0.12.42"