# HG changeset patch # User Richard M. Stallman # Date 770815885 0 # Node ID ddcb81020fa199537a10077adacb3e51fc88eecd # Parent add6e866d6a2fa986610d233f8f3154685cbeeb8 (main): Do the setpgrp after checking for -batch. diff -r add6e866d6a2 -r ddcb81020fa1 src/emacs.c --- a/src/emacs.c Sun Jun 05 11:30:29 1994 +0000 +++ b/src/emacs.c Sun Jun 05 11:31:25 1994 +0000 @@ -409,21 +409,6 @@ 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 @@ 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