summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2013-04-03 17:43:01 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-04-05 17:22:29 +0200
commit827e8dbc3c792ed34b0608c3bd3a4d7b0eedf4f5 (patch)
treeb4fb48b768cec84c506f19c3227d7db4753519b0 /src
parente391eb27c711a5d51f7a5ad92928212fdcb3133a (diff)
downloadsssd-827e8dbc3c792ed34b0608c3bd3a4d7b0eedf4f5.tar.gz
sssd-827e8dbc3c792ed34b0608c3bd3a4d7b0eedf4f5.tar.bz2
sssd-827e8dbc3c792ed34b0608c3bd3a4d7b0eedf4f5.zip
Wrong condition after waitpid.
On success, waitpid() returns pid of terminated child, not 0.
Diffstat (limited to 'src')
-rw-r--r--src/tools/nscd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/nscd.c b/src/tools/nscd.c
index 365383cb..b9f2ba88 100644
--- a/src/tools/nscd.c
+++ b/src/tools/nscd.c
@@ -70,7 +70,7 @@ int flush_nscd_cache(enum nscd_db flush_db)
errno = 0;
ret = waitpid(nscd_pid, &status, 0);
} while (ret == -1 && errno == EINTR);
- if (ret == 0) {
+ if (ret > 0) {
if (WIFEXITED(status)) {
ret = WEXITSTATUS(status);
if (ret > 0) {