diff options
| author | Joakim Verona | 2012-12-08 03:36:33 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-12-08 03:36:33 +0100 |
| commit | b2be0b04729568ad263b9d54b055c95ea2a26ef1 (patch) | |
| tree | f5c539cfc889d95c250dd18e56b19e47e9a8617f /src/callproc.c | |
| parent | 2ba8afbd5ed877ca247e0461183ca72f8f15c03b (diff) | |
| parent | d983a10b9a070fd8f6d4f48ec44e5514b62feaa6 (diff) | |
| download | emacs-b2be0b04729568ad263b9d54b055c95ea2a26ef1.tar.gz emacs-b2be0b04729568ad263b9d54b055c95ea2a26ef1.zip | |
auto upstream
Diffstat (limited to 'src/callproc.c')
| -rw-r--r-- | src/callproc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/callproc.c b/src/callproc.c index e0528a791ea..70e349d0d3a 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -87,12 +87,10 @@ static int synch_process_fd; | |||
| 87 | static void | 87 | static void |
| 88 | block_child_signal (void) | 88 | block_child_signal (void) |
| 89 | { | 89 | { |
| 90 | #ifdef SIGCHLD | ||
| 91 | sigset_t blocked; | 90 | sigset_t blocked; |
| 92 | sigemptyset (&blocked); | 91 | sigemptyset (&blocked); |
| 93 | sigaddset (&blocked, SIGCHLD); | 92 | sigaddset (&blocked, SIGCHLD); |
| 94 | pthread_sigmask (SIG_BLOCK, &blocked, 0); | 93 | pthread_sigmask (SIG_BLOCK, &blocked, 0); |
| 95 | #endif | ||
| 96 | } | 94 | } |
| 97 | 95 | ||
| 98 | /* Unblock SIGCHLD. */ | 96 | /* Unblock SIGCHLD. */ |
| @@ -100,9 +98,7 @@ block_child_signal (void) | |||
| 100 | static void | 98 | static void |
| 101 | unblock_child_signal (void) | 99 | unblock_child_signal (void) |
| 102 | { | 100 | { |
| 103 | #ifdef SIGCHLD | ||
| 104 | pthread_sigmask (SIG_SETMASK, &empty_mask, 0); | 101 | pthread_sigmask (SIG_SETMASK, &empty_mask, 0); |
| 105 | #endif | ||
| 106 | } | 102 | } |
| 107 | 103 | ||
| 108 | /* If P is reapable, record it as a deleted process and kill it. | 104 | /* If P is reapable, record it as a deleted process and kill it. |
| @@ -118,7 +114,7 @@ record_kill_process (struct Lisp_Process *p) | |||
| 118 | { | 114 | { |
| 119 | p->alive = 0; | 115 | p->alive = 0; |
| 120 | record_deleted_pid (p->pid); | 116 | record_deleted_pid (p->pid); |
| 121 | EMACS_KILLPG (p->pid, SIGKILL); | 117 | kill (- p->pid, SIGKILL); |
| 122 | } | 118 | } |
| 123 | 119 | ||
| 124 | unblock_child_signal (); | 120 | unblock_child_signal (); |
| @@ -164,7 +160,7 @@ call_process_cleanup (Lisp_Object arg) | |||
| 164 | if (synch_process_pid) | 160 | if (synch_process_pid) |
| 165 | { | 161 | { |
| 166 | ptrdiff_t count = SPECPDL_INDEX (); | 162 | ptrdiff_t count = SPECPDL_INDEX (); |
| 167 | EMACS_KILLPG (synch_process_pid, SIGINT); | 163 | kill (-synch_process_pid, SIGINT); |
| 168 | record_unwind_protect (call_process_kill, make_number (0)); | 164 | record_unwind_protect (call_process_kill, make_number (0)); |
| 169 | message1 ("Waiting for process to die...(type C-g again to kill it instantly)"); | 165 | message1 ("Waiting for process to die...(type C-g again to kill it instantly)"); |
| 170 | immediate_quit = 1; | 166 | immediate_quit = 1; |