comparison src/process.c @ 15690:d50b8a2e6fe5

(create_process_1, sigchld_handler): Don't reinstall sig handler if POSIX_SIGNALS.
author Karl Heuer <kwzh@gnu.org>
date Mon, 15 Jul 1996 21:51:25 +0000
parents 96debed5fb36
children c7870b16f24b
comparison
equal deleted inserted replaced
15689:7f87e3c7b29c 15690:d50b8a2e6fe5
1165 1165
1166 SIGTYPE 1166 SIGTYPE
1167 create_process_1 (signo) 1167 create_process_1 (signo)
1168 int signo; 1168 int signo;
1169 { 1169 {
1170 #ifdef USG 1170 #if defined(USG) && !defined(POSIX_SIGNALS)
1171 /* USG systems forget handlers when they are used; 1171 /* USG systems forget handlers when they are used;
1172 must reestablish each time */ 1172 must reestablish each time */
1173 signal (signo, create_process_1); 1173 signal (signo, create_process_1);
1174 #endif /* USG */ 1174 #endif /* USG */
1175 } 1175 }
3350 { 3350 {
3351 /* A real failure. We have done all our job, so return. */ 3351 /* A real failure. We have done all our job, so return. */
3352 3352
3353 /* USG systems forget handlers when they are used; 3353 /* USG systems forget handlers when they are used;
3354 must reestablish each time */ 3354 must reestablish each time */
3355 #ifdef USG 3355 #if defined(USG) && !defined(POSIX_SIGNALS)
3356 signal (signo, sigchld_handler); /* WARNING - must come after wait3() */ 3356 signal (signo, sigchld_handler); /* WARNING - must come after wait3() */
3357 #endif 3357 #endif
3358 #ifdef BSD4_1 3358 #ifdef BSD4_1
3359 sigheld &= ~sigbit (SIGCHLD); 3359 sigheld &= ~sigbit (SIGCHLD);
3360 sigrelse (SIGCHLD); 3360 sigrelse (SIGCHLD);
3458 If any more processes want to signal us, we will 3458 If any more processes want to signal us, we will
3459 get another signal. 3459 get another signal.
3460 Otherwise (on systems that have WNOHANG), loop around 3460 Otherwise (on systems that have WNOHANG), loop around
3461 to use up all the processes that have something to tell us. */ 3461 to use up all the processes that have something to tell us. */
3462 #if defined (USG) && ! (defined (HPUX) && defined (WNOHANG)) || defined (WINDOWSNT) 3462 #if defined (USG) && ! (defined (HPUX) && defined (WNOHANG)) || defined (WINDOWSNT)
3463 #ifdef USG 3463 # if defined (USG) && ! defined(POSIX_SIGNALS)
3464 signal (signo, sigchld_handler); 3464 signal (signo, sigchld_handler);
3465 #endif 3465 #endif
3466 errno = old_errno; 3466 errno = old_errno;
3467 return; 3467 return;
3468 #endif /* USG, but not HPUX with WNOHANG */ 3468 #endif /* USG, but not HPUX with WNOHANG */