diff options
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/src/process.c b/src/process.c index 7e8f4cc57bc..a09ac297a2d 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1866,7 +1866,6 @@ create_process (process, new_argv, current_dir) | |||
| 1866 | #if !defined (WINDOWSNT) && defined (FD_CLOEXEC) | 1866 | #if !defined (WINDOWSNT) && defined (FD_CLOEXEC) |
| 1867 | int wait_child_setup[2]; | 1867 | int wait_child_setup[2]; |
| 1868 | #endif | 1868 | #endif |
| 1869 | #ifdef POSIX_SIGNALS | ||
| 1870 | sigset_t procmask; | 1869 | sigset_t procmask; |
| 1871 | sigset_t blocked; | 1870 | sigset_t blocked; |
| 1872 | struct sigaction sigint_action; | 1871 | struct sigaction sigint_action; |
| @@ -1874,7 +1873,6 @@ create_process (process, new_argv, current_dir) | |||
| 1874 | #ifdef AIX | 1873 | #ifdef AIX |
| 1875 | struct sigaction sighup_action; | 1874 | struct sigaction sighup_action; |
| 1876 | #endif | 1875 | #endif |
| 1877 | #endif /* POSIX_SIGNALS */ | ||
| 1878 | /* Use volatile to protect variables from being clobbered by longjmp. */ | 1876 | /* Use volatile to protect variables from being clobbered by longjmp. */ |
| 1879 | volatile int forkin, forkout; | 1877 | volatile int forkin, forkout; |
| 1880 | volatile int pty_flag = 0; | 1878 | volatile int pty_flag = 0; |
| @@ -1979,7 +1977,6 @@ create_process (process, new_argv, current_dir) | |||
| 1979 | 1977 | ||
| 1980 | /* Delay interrupts until we have a chance to store | 1978 | /* Delay interrupts until we have a chance to store |
| 1981 | the new fork's pid in its process structure */ | 1979 | the new fork's pid in its process structure */ |
| 1982 | #ifdef POSIX_SIGNALS | ||
| 1983 | sigemptyset (&blocked); | 1980 | sigemptyset (&blocked); |
| 1984 | #ifdef SIGCHLD | 1981 | #ifdef SIGCHLD |
| 1985 | sigaddset (&blocked, SIGCHLD); | 1982 | sigaddset (&blocked, SIGCHLD); |
| @@ -1996,13 +1993,6 @@ create_process (process, new_argv, current_dir) | |||
| 1996 | #endif | 1993 | #endif |
| 1997 | #endif /* HAVE_WORKING_VFORK */ | 1994 | #endif /* HAVE_WORKING_VFORK */ |
| 1998 | sigprocmask (SIG_BLOCK, &blocked, &procmask); | 1995 | sigprocmask (SIG_BLOCK, &blocked, &procmask); |
| 1999 | #else /* !POSIX_SIGNALS */ | ||
| 2000 | #ifdef SIGCHLD | ||
| 2001 | #if defined (BSD_SYSTEM) | ||
| 2002 | sigsetmask (sigmask (SIGCHLD)); | ||
| 2003 | #endif /* BSD_SYSTEM */ | ||
| 2004 | #endif /* SIGCHLD */ | ||
| 2005 | #endif /* !POSIX_SIGNALS */ | ||
| 2006 | 1996 | ||
| 2007 | FD_SET (inchannel, &input_wait_mask); | 1997 | FD_SET (inchannel, &input_wait_mask); |
| 2008 | FD_SET (inchannel, &non_keyboard_wait_mask); | 1998 | FD_SET (inchannel, &non_keyboard_wait_mask); |
| @@ -2153,15 +2143,7 @@ create_process (process, new_argv, current_dir) | |||
| 2153 | signal (SIGQUIT, SIG_DFL); | 2143 | signal (SIGQUIT, SIG_DFL); |
| 2154 | 2144 | ||
| 2155 | /* Stop blocking signals in the child. */ | 2145 | /* Stop blocking signals in the child. */ |
| 2156 | #ifdef POSIX_SIGNALS | ||
| 2157 | sigprocmask (SIG_SETMASK, &procmask, 0); | 2146 | sigprocmask (SIG_SETMASK, &procmask, 0); |
| 2158 | #else /* !POSIX_SIGNALS */ | ||
| 2159 | #ifdef SIGCHLD | ||
| 2160 | #if defined (BSD_SYSTEM) | ||
| 2161 | sigsetmask (SIGEMPTYMASK); | ||
| 2162 | #endif /* BSD_SYSTEM */ | ||
| 2163 | #endif /* SIGCHLD */ | ||
| 2164 | #endif /* !POSIX_SIGNALS */ | ||
| 2165 | 2147 | ||
| 2166 | if (pty_flag) | 2148 | if (pty_flag) |
| 2167 | child_setup_tty (xforkout); | 2149 | child_setup_tty (xforkout); |
| @@ -2243,7 +2225,6 @@ create_process (process, new_argv, current_dir) | |||
| 2243 | 2225 | ||
| 2244 | /* Restore the signal state whether vfork succeeded or not. | 2226 | /* Restore the signal state whether vfork succeeded or not. |
| 2245 | (We will signal an error, below, if it failed.) */ | 2227 | (We will signal an error, below, if it failed.) */ |
| 2246 | #ifdef POSIX_SIGNALS | ||
| 2247 | #ifdef HAVE_WORKING_VFORK | 2228 | #ifdef HAVE_WORKING_VFORK |
| 2248 | /* Restore the parent's signal handlers. */ | 2229 | /* Restore the parent's signal handlers. */ |
| 2249 | sigaction (SIGINT, &sigint_action, 0); | 2230 | sigaction (SIGINT, &sigint_action, 0); |
| @@ -2254,13 +2235,6 @@ create_process (process, new_argv, current_dir) | |||
| 2254 | #endif /* HAVE_WORKING_VFORK */ | 2235 | #endif /* HAVE_WORKING_VFORK */ |
| 2255 | /* Stop blocking signals in the parent. */ | 2236 | /* Stop blocking signals in the parent. */ |
| 2256 | sigprocmask (SIG_SETMASK, &procmask, 0); | 2237 | sigprocmask (SIG_SETMASK, &procmask, 0); |
| 2257 | #else /* !POSIX_SIGNALS */ | ||
| 2258 | #ifdef SIGCHLD | ||
| 2259 | #if defined (BSD_SYSTEM) | ||
| 2260 | sigsetmask (SIGEMPTYMASK); | ||
| 2261 | #endif /* BSD_SYSTEM */ | ||
| 2262 | #endif /* SIGCHLD */ | ||
| 2263 | #endif /* !POSIX_SIGNALS */ | ||
| 2264 | 2238 | ||
| 2265 | /* Now generate the error if vfork failed. */ | 2239 | /* Now generate the error if vfork failed. */ |
| 2266 | if (pid < 0) | 2240 | if (pid < 0) |
| @@ -5396,7 +5370,7 @@ read_process_output (proc, channel) | |||
| 5396 | /* There's no good reason to let process filters change the current | 5370 | /* There's no good reason to let process filters change the current |
| 5397 | buffer, and many callers of accept-process-output, sit-for, and | 5371 | buffer, and many callers of accept-process-output, sit-for, and |
| 5398 | friends don't expect current-buffer to be changed from under them. */ | 5372 | friends don't expect current-buffer to be changed from under them. */ |
| 5399 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 5373 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); |
| 5400 | 5374 | ||
| 5401 | /* Read and dispose of the process output. */ | 5375 | /* Read and dispose of the process output. */ |
| 5402 | outstream = p->filter; | 5376 | outstream = p->filter; |
| @@ -6814,7 +6788,7 @@ exec_sentinel (proc, reason) | |||
| 6814 | /* There's no good reason to let sentinels change the current | 6788 | /* There's no good reason to let sentinels change the current |
| 6815 | buffer, and many callers of accept-process-output, sit-for, and | 6789 | buffer, and many callers of accept-process-output, sit-for, and |
| 6816 | friends don't expect current-buffer to be changed from under them. */ | 6790 | friends don't expect current-buffer to be changed from under them. */ |
| 6817 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 6791 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); |
| 6818 | 6792 | ||
| 6819 | sentinel = p->sentinel; | 6793 | sentinel = p->sentinel; |
| 6820 | if (NILP (sentinel)) | 6794 | if (NILP (sentinel)) |