In FORK, flush output ports inside the narrowed section, not before,
avoiding some, erm, pretty obvious race condition.
This commit is contained in:
parent
a51ba12623
commit
1e1d44a497
|
@ -1065,7 +1065,6 @@
|
|||
;;; Assumes niladic primitive %%FORK.
|
||||
|
||||
(define (fork . stuff)
|
||||
(flush-all-ports)
|
||||
(apply fork-1 #t stuff))
|
||||
|
||||
(define (%fork . stuff)
|
||||
|
@ -1104,6 +1103,10 @@
|
|||
(lambda (thunk) (thunk)))))
|
||||
(maybe-narrow
|
||||
(lambda ()
|
||||
|
||||
(if clear-interactive?
|
||||
(flush-all-ports))
|
||||
|
||||
;; There was an atomicity problem/race condition -- if a child
|
||||
;; process died after it was forked, but before the scsh fork
|
||||
;; procedure could register the child's procobj in the
|
||||
|
|
Loading…
Reference in New Issue