If a fork narrows the thread system to the current thread, the REPL
gets suspended. However, in an interactive session, the REPL is very likely to hold the lock of the input port. Hence, release the locks of the command ports in the child if NARROW? is true.
This commit is contained in:
parent
9a7d5fb8dd
commit
8f234fc733
|
@ -1135,6 +1135,14 @@
|
|||
(if (zero? pid)
|
||||
;; Child
|
||||
(lambda () ; Do all this outside the WITH-INTERRUPTS.
|
||||
(if narrow?
|
||||
(begin
|
||||
;; ugly kludge:
|
||||
;; the REPL thread is not running any more,
|
||||
;; hence unlock its command ports
|
||||
(release-port-lock (command-input))
|
||||
(release-port-lock (command-output))
|
||||
(release-port-lock (command-error-output))))
|
||||
;; There is no session if parent was started in batch-mode
|
||||
(if (and (session-started?) clear-interactive?)
|
||||
(set-batch-mode?! #t)) ; Children are non-interactive.
|
||||
|
|
Loading…
Reference in New Issue