From c661d892487141903cacdcda4077cfd36b218d12 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Sun, 7 Aug 2016 20:59:19 +0200 Subject: [PATCH] Bug fix: Exit status with Allegro CL after signal If a process is killed by a signal, sys:reap-os-subprocess will return (0, pid, signal) so that checking the exit code alone does not suffice. --- uiop/run-program.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uiop/run-program.lisp b/uiop/run-program.lisp index 4d0565e6e..4532196d3 100644 --- a/uiop/run-program.lisp +++ b/uiop/run-program.lisp @@ -573,7 +573,9 @@ It returns a process-info plist with possible keys: #+(or cmu scl) (ext:process-wait process) #+sbcl (sb-ext:process-wait process) ;; 2- extract result - #+allegro (sys:reap-os-subprocess :pid process :wait t) + #+allegro (multiple-value-bind (exit-code pid signal) + (sys:reap-os-subprocess :pid process :wait t) + (or signal exit-code)) #+clozure (nth-value 1 (ccl:external-process-status process)) #+(or cmu scl) (ext:process-exit-code process) #+(or clasp ecl) (nth-value 1 (ext:external-process-wait process t)) -- GitLab