summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index ac9c701b70..2457dec14d 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3779,29 +3779,7 @@ check if a process exists. Does this work on all unixes?
****************************************************************************/
BOOL process_exists(int pid)
{
-#ifdef LINUX
- fstring s;
- sprintf(s,"/proc/%d",pid);
- return(directory_exist(s,NULL));
-#else
- {
- static BOOL tested=False;
- static BOOL ok=False;
- fstring s;
- if (!tested) {
- tested = True;
- sprintf(s,"/proc/%05d",(int)getpid());
- ok = file_exist(s,NULL);
- }
- if (ok) {
- sprintf(s,"/proc/%05d",pid);
- return(file_exist(s,NULL));
- }
- }
-
- /* CGH 8/16/96 - added ESRCH test */
- return(pid == getpid() || kill(pid,0) == 0 || errno != ESRCH);
-#endif
+ return(kill(pid,0) == 0 || errno != ESRCH);
}