diff --git a/cde/programs/dtlogin/dm.c b/cde/programs/dtlogin/dm.c index 54d1dbee5..a5b800d78 100644 --- a/cde/programs/dtlogin/dm.c +++ b/cde/programs/dtlogin/dm.c @@ -68,7 +68,7 @@ # include #endif -#if defined (SYSV) || defined (SVR4) +#if defined(SYSV) || defined(SVR4) || defined(__linux__) #ifndef F_TLOCK # include #endif @@ -529,11 +529,10 @@ WaitForChild( void ) waitType status; int mask; -#if defined(SYSV) || defined(SVR4) || defined(hpux) - +#if defined(SYSV) || defined(SVR4) || defined(hpux) || defined(__linux__) if (AnyWellKnownSockets()) { while ( ChildReady ) { -#ifdef SVR4 +#if defined(SVR4) || defined(__linux__) while ((pid = waitpid((pid_t) -1, &status, WNOHANG)) > 0 ) #else while ((pid = wait3 (&status, WNOHANG, NULL)) > 0 ) @@ -1337,7 +1336,7 @@ StorePid( void ) fseek (pidFilePtr, 0l, 0); if (lockPidFile) { -#if defined (SYSV) || defined (SVR4) +#if defined(SYSV) || defined(SVR4) || defined(__linux__) if (lockf (pidFd, F_TLOCK, 0) == -1) { if ((errno == EAGAIN) || (errno == EACCES)) @@ -1374,7 +1373,7 @@ static void UnlockPidFile( void ) { if (lockPidFile) -#if defined (SYSV) || defined (SVR4) +#if defined(SYSV) || defined(SVR4) || defined(__linux__) lockf (pidFd, F_ULOCK, 0); #else flock (pidFd, LOCK_UN); diff --git a/cde/programs/dtsession/SmUI.c b/cde/programs/dtsession/SmUI.c index 9ea710de9..263d8ff19 100644 --- a/cde/programs/dtsession/SmUI.c +++ b/cde/programs/dtsession/SmUI.c @@ -1161,7 +1161,7 @@ ImmediateExit( * Turn off SIGTERM so we don't catch one in the middle of shutting * down */ -#if !defined(SVR4) +#if !defined(SVR4) && !defined(__linux__) old = sigblock(sigmask(SIGTERM)); sigblock(sigmask(SIGHUP)); sigblock(sigmask(SIGPIPE));