diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-02-11 10:44:17 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-02-11 11:49:07 -0800 |
commit | c31f9dcc8055fdf6b5ff2cc59fef89e1cf09a0ab (patch) | |
tree | 4ca22efbbe45325c10bebef0483caee0668226f5 | |
parent | 48ad0d9b915f858fda2b005d4e7f01ca465a51f9 (diff) |
unifdef UNRELIABLE_SIGNALS
UNRELIABLE_SIGNALS was only defined if SYSV was defined
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xdm/dm.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -106,9 +106,7 @@ static char *Title; static int TitleLen; #endif -#ifndef UNRELIABLE_SIGNALS static void ChildNotify (int n); -#endif static long StorePid (void); static void RemovePid (void); @@ -248,9 +246,7 @@ main (int argc, char **argv) AddOtherEntropy(); #endif (void) Signal (SIGHUP, RescanNotify); -#ifndef UNRELIABLE_SIGNALS (void) Signal (SIGCHLD, ChildNotify); -#endif Debug ("startup successful; entering main loop\n"); while ( #ifdef XDMCP @@ -263,7 +259,7 @@ main (int argc, char **argv) RescanServers (); Rescan = 0; } -#if defined(UNRELIABLE_SIGNALS) || !defined(XDMCP) +#ifndef XDMCP WaitForChild (); #else WaitForSomething (); @@ -454,7 +450,6 @@ StopAll (int n) int ChildReady; -#ifndef UNRELIABLE_SIGNALS /* ARGSUSED */ static void ChildNotify (int n) @@ -464,7 +459,6 @@ ChildNotify (int n) ChildReady = 1; errno = olderrno; } -#endif void WaitForChild (void) @@ -478,10 +472,6 @@ WaitForChild (void) int omask; #endif -#ifdef UNRELIABLE_SIGNALS - /* XXX classic System V signal race condition here with RescanNotify */ - if ((pid = wait (&status)) != -1) -#else # ifndef X_NOT_POSIX sigemptyset(&mask); sigaddset(&mask, SIGCHLD); @@ -505,7 +495,6 @@ WaitForChild (void) sigsetmask (omask); # endif while ((pid = waitpid (-1, &status, WNOHANG)) > 0) -#endif { Debug ("Manager wait returns pid: %d sig %d core %d code %d\n", pid, waitSig(status), waitCore(status), waitCode(status)); |