diff options
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index aeaac29ae1..5ef1d21a7a 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3089,11 +3089,8 @@ BOOL process_exists(int pid) } } - /* a best guess for non root access */ - if (geteuid() != 0) return(True); - - /* otherwise use kill */ - return(pid == getpid() || kill(pid,0) == 0); + /* CGH 8/16/96 - added ESRCH test */ + return(pid == getpid() || kill(pid,0) == 0 || errno != ESRCH); #endif } |