From 4721c800154f80478023a77a530d64cbfaf50901 Mon Sep 17 00:00:00 2001 From: Richard M Kreuter Date: Fri, 21 Dec 2007 00:42:23 +0000 Subject: [PATCH] 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). --- src/code/run-program.lisp | 3 ++- src/runtime/run-program.c | 4 ++-- version.lisp-expr | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/code/run-program.lisp b/src/code/run-program.lisp index b1331dea3..e1ab659ee 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 303b28028..6b7575c6c 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 aa2818060..e5f080e73 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" -- 2.11.4.GIT