From edb85f595aa12bfc4ab97d8c4e981687e42c6c74 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 5 Jun 1994 11:31:25 +0000 Subject: [PATCH] (main): Do the setpgrp after checking for -batch. --- src/emacs.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index abd6e9d1dd1..04f45a3a866 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -409,21 +409,6 @@ main (argc, argv, envp) clearerr (stdin); - if (! noninteractive1) - { -#ifdef BSD_PGRPS - if (initialized) - { - inherited_pgroup = EMACS_GETPGRP (0); - setpgrp (0, getpid ()); - } -#else -#if defined (USG5) && defined (INTERRUPT_INPUT) - setpgrp (); -#endif -#endif - } - #ifdef APOLLO #ifndef APOLLO_SR10 /* If USE_DOMAIN_ACLS environment variable exists, @@ -507,6 +492,21 @@ main (argc, argv, envp) noninteractive = 1; } + if (! noninteractive) + { +#ifdef BSD_PGRPS + if (initialized) + { + inherited_pgroup = EMACS_GETPGRP (0); + setpgrp (0, getpid ()); + } +#else +#if defined (USG5) && defined (INTERRUPT_INPUT) + setpgrp (); +#endif +#endif + } + #ifdef POSIX_SIGNALS init_signals (); #endif -- 2.39.5