comparison src/process.c @ 16116:80a67b8f39e9

(create_process_1, sigchld_handler) [POSIX_SIGNALS]: Don't reestablish handler.
author Richard M. Stallman <rms@gnu.org>
date Wed, 04 Sep 1996 15:07:07 +0000
parents 5d1e0290bbd0
children 8d6d35b486c0
comparison
equal deleted inserted replaced
16115:cc8c3e2cc6ed 16116:80a67b8f39e9
1175 1175
1176 SIGTYPE 1176 SIGTYPE
1177 create_process_1 (signo) 1177 create_process_1 (signo)
1178 int signo; 1178 int signo;
1179 { 1179 {
1180 #ifdef USG 1180 #if defined (USG) && !defined (POSIX_SIGNALS)
1181 /* USG systems forget handlers when they are used; 1181 /* USG systems forget handlers when they are used;
1182 must reestablish each time */ 1182 must reestablish each time */
1183 signal (signo, create_process_1); 1183 signal (signo, create_process_1);
1184 #endif /* USG */ 1184 #endif /* USG */
1185 } 1185 }
3369 { 3369 {
3370 /* A real failure. We have done all our job, so return. */ 3370 /* A real failure. We have done all our job, so return. */
3371 3371
3372 /* USG systems forget handlers when they are used; 3372 /* USG systems forget handlers when they are used;
3373 must reestablish each time */ 3373 must reestablish each time */
3374 #ifdef USG 3374 #if defined (USG) && !defined (POSIX_SIGNALS)
3375 signal (signo, sigchld_handler); /* WARNING - must come after wait3() */ 3375 signal (signo, sigchld_handler); /* WARNING - must come after wait3() */
3376 #endif 3376 #endif
3377 #ifdef BSD4_1 3377 #ifdef BSD4_1
3378 sigheld &= ~sigbit (SIGCHLD); 3378 sigheld &= ~sigbit (SIGCHLD);
3379 sigrelse (SIGCHLD); 3379 sigrelse (SIGCHLD);
3477 If any more processes want to signal us, we will 3477 If any more processes want to signal us, we will
3478 get another signal. 3478 get another signal.
3479 Otherwise (on systems that have WNOHANG), loop around 3479 Otherwise (on systems that have WNOHANG), loop around
3480 to use up all the processes that have something to tell us. */ 3480 to use up all the processes that have something to tell us. */
3481 #if defined (USG) && ! (defined (HPUX) && defined (WNOHANG)) || defined (WINDOWSNT) 3481 #if defined (USG) && ! (defined (HPUX) && defined (WNOHANG)) || defined (WINDOWSNT)
3482 #ifdef USG 3482 #if defined (USG) && ! defined (POSIX_SIGNALS)
3483 signal (signo, sigchld_handler); 3483 signal (signo, sigchld_handler);
3484 #endif 3484 #endif
3485 errno = old_errno; 3485 errno = old_errno;
3486 return; 3486 return;
3487 #endif /* USG, but not HPUX with WNOHANG */ 3487 #endif /* USG, but not HPUX with WNOHANG */