~ chicken-core (chicken-5) c5983812188d01daeaa9bc64e7306f2a34a9f207


commit c5983812188d01daeaa9bc64e7306f2a34a9f207
Author:     Evan Hanson <evhan@foldling.org>
AuthorDate: Fri Aug 12 17:47:58 2016 +1200
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Fri Aug 12 17:55:51 2016 +1200

    Preserve spawnvp[e] return value in process-spawn

diff --git a/posixwin.scm b/posixwin.scm
index 89edd82f..302a91b1 100644
--- a/posixwin.scm
+++ b/posixwin.scm
@@ -1173,7 +1173,8 @@ EOF
 		    (##core#inline "C_u_i_spawnvpe" mode prg argbuf envbuf)
 		    (##core#inline "C_u_i_spawnvp" mode prg argbuf))))
 	 (when (fx= r -1)
-	   (posix-error #:process-error 'process-spawn "cannot spawn process" filename)))))))
+	   (posix-error #:process-error 'process-spawn "cannot spawn process" filename))
+	 r)))))
 
 (define-foreign-variable _shlcmd c-string "C_shlcmd")
 
Trap