Mercurial > emacs
comparison src/process.c @ 41856:0028402ed7d1
(create_process): Use HAVE_WORKING_VFORK, not HAVE_VFORK.
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Fri, 07 Dec 2001 05:52:35 +0000 |
parents | cdfd4d09b79a |
children | e669966d496e |
comparison
equal
deleted
inserted
replaced
41855:44ee7ea631a7 | 41856:0028402ed7d1 |
---|---|
1426 #ifdef POSIX_SIGNALS | 1426 #ifdef POSIX_SIGNALS |
1427 sigemptyset (&blocked); | 1427 sigemptyset (&blocked); |
1428 #ifdef SIGCHLD | 1428 #ifdef SIGCHLD |
1429 sigaddset (&blocked, SIGCHLD); | 1429 sigaddset (&blocked, SIGCHLD); |
1430 #endif | 1430 #endif |
1431 #ifdef HAVE_VFORK | 1431 #ifdef HAVE_WORKING_VFORK |
1432 /* On many hosts (e.g. Solaris 2.4), if a vforked child calls `signal', | 1432 /* On many hosts (e.g. Solaris 2.4), if a vforked child calls `signal', |
1433 this sets the parent's signal handlers as well as the child's. | 1433 this sets the parent's signal handlers as well as the child's. |
1434 So delay all interrupts whose handlers the child might munge, | 1434 So delay all interrupts whose handlers the child might munge, |
1435 and record the current handlers so they can be restored later. */ | 1435 and record the current handlers so they can be restored later. */ |
1436 sigaddset (&blocked, SIGINT ); sigaction (SIGINT , 0, &sigint_action ); | 1436 sigaddset (&blocked, SIGINT ); sigaction (SIGINT , 0, &sigint_action ); |
1437 sigaddset (&blocked, SIGQUIT); sigaction (SIGQUIT, 0, &sigquit_action); | 1437 sigaddset (&blocked, SIGQUIT); sigaction (SIGQUIT, 0, &sigquit_action); |
1438 #ifdef AIX | 1438 #ifdef AIX |
1439 sigaddset (&blocked, SIGHUP ); sigaction (SIGHUP , 0, &sighup_action ); | 1439 sigaddset (&blocked, SIGHUP ); sigaction (SIGHUP , 0, &sighup_action ); |
1440 #endif | 1440 #endif |
1441 #endif /* HAVE_VFORK */ | 1441 #endif /* HAVE_WORKING_VFORK */ |
1442 sigprocmask (SIG_BLOCK, &blocked, &procmask); | 1442 sigprocmask (SIG_BLOCK, &blocked, &procmask); |
1443 #else /* !POSIX_SIGNALS */ | 1443 #else /* !POSIX_SIGNALS */ |
1444 #ifdef SIGCHLD | 1444 #ifdef SIGCHLD |
1445 #ifdef BSD4_1 | 1445 #ifdef BSD4_1 |
1446 sighold (SIGCHLD); | 1446 sighold (SIGCHLD); |
1694 } | 1694 } |
1695 | 1695 |
1696 /* Restore the signal state whether vfork succeeded or not. | 1696 /* Restore the signal state whether vfork succeeded or not. |
1697 (We will signal an error, below, if it failed.) */ | 1697 (We will signal an error, below, if it failed.) */ |
1698 #ifdef POSIX_SIGNALS | 1698 #ifdef POSIX_SIGNALS |
1699 #ifdef HAVE_VFORK | 1699 #ifdef HAVE_WORKING_VFORK |
1700 /* Restore the parent's signal handlers. */ | 1700 /* Restore the parent's signal handlers. */ |
1701 sigaction (SIGINT, &sigint_action, 0); | 1701 sigaction (SIGINT, &sigint_action, 0); |
1702 sigaction (SIGQUIT, &sigquit_action, 0); | 1702 sigaction (SIGQUIT, &sigquit_action, 0); |
1703 #ifdef AIX | 1703 #ifdef AIX |
1704 sigaction (SIGHUP, &sighup_action, 0); | 1704 sigaction (SIGHUP, &sighup_action, 0); |
1705 #endif | 1705 #endif |
1706 #endif /* HAVE_VFORK */ | 1706 #endif /* HAVE_WORKING_VFORK */ |
1707 /* Stop blocking signals in the parent. */ | 1707 /* Stop blocking signals in the parent. */ |
1708 sigprocmask (SIG_SETMASK, &procmask, 0); | 1708 sigprocmask (SIG_SETMASK, &procmask, 0); |
1709 #else /* !POSIX_SIGNALS */ | 1709 #else /* !POSIX_SIGNALS */ |
1710 #ifdef SIGCHLD | 1710 #ifdef SIGCHLD |
1711 #ifdef BSD4_1 | 1711 #ifdef BSD4_1 |