From: Taylor R Campbell Date: Sun, 2 Jun 2013 15:33:41 +0000 (+0000) Subject: Don't setsid Scheme. X-Git-Tag: release-9.2.0~174 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=69708975b718e202dd85c42cefe948747bfbd006;p=mit-scheme.git Don't setsid Scheme. If you want to detach from the controlling terminal, use a trivial wrapper program that calls setsid and then exec (e.g., pgrphack from daemontools), or add a primitive to Scheme to daemonize without race conditions. Hitting ^C at the terminal now works to interrupt Scheme in batch mode, e.g. when run under make during the build. --- diff --git a/src/microcode/uxtop.c b/src/microcode/uxtop.c index da11c63f1..9c9d0d918 100644 --- a/src/microcode/uxtop.c +++ b/src/microcode/uxtop.c @@ -80,13 +80,6 @@ OS_initialize (void) || (isatty (STDIN_FILENO)) || (isatty (STDOUT_FILENO)) || (isatty (STDERR_FILENO))); - /* If none of the stdio streams is a terminal, disassociate us - from the controlling terminal so that we're not affected by - keyboard interrupts or hangup signals. However, if we're - running under Emacs we don't want to do this, because we want - to receive a hangup signal if Emacs dies. */ - if ((!interactive) && (!option_emacs_subprocess)) - UX_setsid (); if (option_batch_mode) interactive = false; /* The argument passed to `UX_ctty_initialize' says whether to