1
Fork 0
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:
Andy Wingo 2010-06-19 15:20:02 +02:00
parent c4a8200fa0
commit 0feb833d22

View file

@ -2677,15 +2677,13 @@ module '(ice-9 q) '(make-q q-length))}."
;; `batch-mode?' returns #f during their extent. ;; `batch-mode?' returns #f during their extent.
;; ;;
;; Programs can re-enter batch mode, for example after a fork, by calling ;; 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 ;; `ensure-batch-mode!'. It's not a great interface, though; it would be better
;; great interface, though; it would be better to abort to the outermost prompt, ;; to abort to the outermost prompt, and call a thunk there.
;; and call a thunk there.
(define *repl-level* (make-fluid)) (define *repl-level* (make-fluid))
(define (batch-mode?) (define (batch-mode?)
(negative? (or (fluid-ref *repl-level*) -1))) (negative? (or (fluid-ref *repl-level*) -1)))
(define (ensure-batch-mode!) (define (ensure-batch-mode!)
(fluid-set! *repl-level* #f) (fluid-set! *repl-level* #f))
(restore-signals))
(define (quit . args) (define (quit . args)
(apply throw 'quit args)) (apply throw 'quit args))