mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 20:40:29 +02:00
don't unconditionally restore signals in ensure-batch-mode!
* module/ice-9/boot-9.scm (ensure-batch-mode!): Remove comment about restoring signals, and that behavior, as it was making popen.test hang. I should investigate further, but instead I'm just going to hope that this fixes it.
This commit is contained in:
parent
c4a8200fa0
commit
0feb833d22
1 changed files with 3 additions and 5 deletions
|
@ -2677,15 +2677,13 @@ module '(ice-9 q) '(make-q q-length))}."
|
|||
;; `batch-mode?' returns #f during their extent.
|
||||
;;
|
||||
;; Programs can re-enter batch mode, for example after a fork, by calling
|
||||
;; `ensure-batch-mode!'. This will also restore signal handlers. It's not a
|
||||
;; great interface, though; it would be better to abort to the outermost prompt,
|
||||
;; and call a thunk there.
|
||||
;; `ensure-batch-mode!'. It's not a great interface, though; it would be better
|
||||
;; to abort to the outermost prompt, and call a thunk there.
|
||||
(define *repl-level* (make-fluid))
|
||||
(define (batch-mode?)
|
||||
(negative? (or (fluid-ref *repl-level*) -1)))
|
||||
(define (ensure-batch-mode!)
|
||||
(fluid-set! *repl-level* #f)
|
||||
(restore-signals))
|
||||
(fluid-set! *repl-level* #f))
|
||||
|
||||
(define (quit . args)
|
||||
(apply throw 'quit args))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue