diff options
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/callproc.c b/src/callproc.c index b33882e54c2..c7bbe36e605 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -64,13 +64,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 64 | #include "nsterm.h" | 64 | #include "nsterm.h" |
| 65 | #endif | 65 | #endif |
| 66 | 66 | ||
| 67 | #ifdef HAVE_SETPGID | ||
| 68 | #if !defined (USG) | ||
| 69 | #undef setpgrp | ||
| 70 | #define setpgrp setpgid | ||
| 71 | #endif | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /* Pattern used by call-process-region to make temp files. */ | 67 | /* Pattern used by call-process-region to make temp files. */ |
| 75 | static Lisp_Object Vtemp_file_name_pattern; | 68 | static Lisp_Object Vtemp_file_name_pattern; |
| 76 | 69 | ||
| @@ -618,14 +611,8 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 618 | { | 611 | { |
| 619 | if (fd[0] >= 0) | 612 | if (fd[0] >= 0) |
| 620 | emacs_close (fd[0]); | 613 | emacs_close (fd[0]); |
| 621 | #ifdef HAVE_SETSID | 614 | |
| 622 | setsid (); | 615 | setsid (); |
| 623 | #endif | ||
| 624 | #if defined (USG) | ||
| 625 | setpgrp (); | ||
| 626 | #else | ||
| 627 | setpgrp (pid, pid); | ||
| 628 | #endif /* USG */ | ||
| 629 | 616 | ||
| 630 | /* Emacs ignores SIGPIPE, but the child should not. */ | 617 | /* Emacs ignores SIGPIPE, but the child should not. */ |
| 631 | signal (SIGPIPE, SIG_DFL); | 618 | signal (SIGPIPE, SIG_DFL); |
| @@ -1295,15 +1282,7 @@ child_setup (int in, int out, int err, char **new_argv, bool set_pgrp, | |||
| 1295 | if (err != in && err != out) | 1282 | if (err != in && err != out) |
| 1296 | emacs_close (err); | 1283 | emacs_close (err); |
| 1297 | 1284 | ||
| 1298 | #if defined (USG) | 1285 | setpgid (0, 0); |
| 1299 | #ifndef SETPGRP_RELEASES_CTTY | ||
| 1300 | setpgrp (); /* No arguments but equivalent in this case */ | ||
| 1301 | #endif | ||
| 1302 | #else /* not USG */ | ||
| 1303 | setpgrp (pid, pid); | ||
| 1304 | #endif /* not USG */ | ||
| 1305 | |||
| 1306 | /* setpgrp_of_tty is incorrect here; it uses input_fd. */ | ||
| 1307 | tcsetpgrp (0, pid); | 1286 | tcsetpgrp (0, pid); |
| 1308 | 1287 | ||
| 1309 | /* execvp does not accept an environment arg so the only way | 1288 | /* execvp does not accept an environment arg so the only way |