lib/util: don't SMB_ASSERT() in process_exists_by_pid()
authorStefan Metzmacher <metze@samba.org>
Wed, 22 Aug 2012 15:52:01 +0000 (17:52 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 24 Aug 2012 11:43:32 +0000 (13:43 +0200)
Just return false...

metze

lib/util/util.c

index 100d3d84ab377c044ef3887bc658ccbea1931227..b50d28afcf34b9c2df1f25891125733f0a3072d2 100644 (file)
@@ -286,7 +286,9 @@ _PUBLIC_ bool process_exists_by_pid(pid_t pid)
 {
        /* Doing kill with a non-positive pid causes messages to be
         * sent to places we don't want. */
-       SMB_ASSERT(pid > 0);
+       if (pid <= 0) {
+               return false;
+       }
        return(kill(pid,0) == 0 || errno != ESRCH);
 }