summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util/util.c b/lib/util/util.c
index 100d3d84ab..b50d28afcf 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -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);
}