Mercurial > hg > xemacs-beta
comparison src/process.c @ 36:c53a95d3c46d r19-15b101
Import from CVS: tag r19-15b101
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:53:38 +0200 |
parents | ec9a17fef872 |
children | 8d2a9b52c682 |
comparison
equal
deleted
inserted
replaced
35:279432d5c479 | 36:c53a95d3c46d |
---|---|
2150 reap_exited_processes (void) | 2150 reap_exited_processes (void) |
2151 { | 2151 { |
2152 int i; | 2152 int i; |
2153 struct Lisp_Process *p; | 2153 struct Lisp_Process *p; |
2154 | 2154 |
2155 if (exited_processes_index <= 0) | |
2156 return; | |
2155 EMACS_BLOCK_SIGNAL (SIGCHLD); | 2157 EMACS_BLOCK_SIGNAL (SIGCHLD); |
2156 for (i = 0; i < exited_processes_index; i++) | 2158 for (i = 0; i < exited_processes_index; i++) |
2157 { | 2159 { |
2158 int pid = exited_processes[i]; | 2160 int pid = exited_processes[i]; |
2159 WAITTYPE w = exited_processes_status[i]; | 2161 WAITTYPE w = exited_processes_status[i]; |
2230 race conditions with the SIGCHLD_HAPPENED flag). */ | 2232 race conditions with the SIGCHLD_HAPPENED flag). */ |
2231 | 2233 |
2232 static void | 2234 static void |
2233 record_exited_processes (int block_sigchld) | 2235 record_exited_processes (int block_sigchld) |
2234 { | 2236 { |
2237 if (!sigchld_happened) | |
2238 return; | |
2235 if (block_sigchld) | 2239 if (block_sigchld) |
2236 EMACS_BLOCK_SIGNAL (SIGCHLD); | 2240 EMACS_BLOCK_SIGNAL (SIGCHLD); |
2237 | 2241 |
2238 while (sigchld_happened) | 2242 while (sigchld_happened) |
2239 { | 2243 { |