summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/ProcessUNIX.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-03-08 17:42:59 (GMT)
committerBrad King <brad.king@kitware.com>2006-03-08 17:42:59 (GMT)
commit6fb7bac0131d3ae6b530bf59efbf702bf7dc781e (patch)
treec1461f4e5c97ce24147c7679dbbac794d70b5bbc /Source/kwsys/ProcessUNIX.c
parent95f86d5d6f37d800cc641baba30152d5ef750398 (diff)
downloadCMake-6fb7bac0131d3ae6b530bf59efbf702bf7dc781e.zip
CMake-6fb7bac0131d3ae6b530bf59efbf702bf7dc781e.tar.gz
CMake-6fb7bac0131d3ae6b530bf59efbf702bf7dc781e.tar.bz2
ENH: Enabled process tree killing on the SGI.
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r--Source/kwsys/ProcessUNIX.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index 14258ce..7ec19bc 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -1906,7 +1906,7 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
# define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
# define KWSYSPE_PS_FORMAT "%d %d\n"
-#elif defined(__hpux) || defined(__sparc)
+#elif defined(__hpux) || defined(__sparc) || defined(__sgi)
# define KWSYSPE_PS_COMMAND "ps -ef"
# define KWSYSPE_PS_FORMAT "%*s %d %d %*[^\n]\n"
#endif
@@ -1914,7 +1914,9 @@ static pid_t kwsysProcessFork(kwsysProcess* cp,
/*--------------------------------------------------------------------------*/
static void kwsysProcessKill(pid_t process_id)
{
+#if defined(__linux__)
DIR* procdir;
+#endif
/* Suspend the process to be sure it will not create more children. */
kill(process_id, SIGSTOP);