Exit subshells with the current status
* geesh/shell.scm (%subshell): Use with-continuation-barrier and primitive-exit to make sure the child process exits with its status.
This commit is contained in:
parent
77f3113fd0
commit
b4a6350887
|
@ -206,8 +206,11 @@ process."
|
|||
;; duplicate output.
|
||||
(flush-all-ports)
|
||||
(match (primitive-fork)
|
||||
(0 (thunk)
|
||||
(primitive-exit))
|
||||
(0 (with-continuation-barrier
|
||||
(lambda ()
|
||||
(thunk)
|
||||
(primitive-exit (get-status))))
|
||||
(primitive-exit 1))
|
||||
(pid pid)))
|
||||
|
||||
(define (sh:subshell thunk)
|
||||
|
|
Loading…
Reference in New Issue