summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-22 17:52:01 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-24 13:43:32 +0200
commit95f3662bbd587af24c2ff5411318e9d466412ee9 (patch)
tree20874a83b61cb2e5fae5d41bae707d1b991313e9 /lib
parent0b5e354080ae1990b1f8acc470bfbad3f92868b8 (diff)
downloadsamba-95f3662bbd587af24c2ff5411318e9d466412ee9.tar.gz
samba-95f3662bbd587af24c2ff5411318e9d466412ee9.tar.bz2
samba-95f3662bbd587af24c2ff5411318e9d466412ee9.zip
lib/util: don't SMB_ASSERT() in process_exists_by_pid()
Just return false... metze
Diffstat (limited to 'lib')
-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);
}