diff options
author | Michal Zidek <mzidek@redhat.com> | 2013-04-03 17:43:01 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-04-05 17:22:29 +0200 |
commit | 827e8dbc3c792ed34b0608c3bd3a4d7b0eedf4f5 (patch) | |
tree | b4fb48b768cec84c506f19c3227d7db4753519b0 /src/tools | |
parent | e391eb27c711a5d51f7a5ad92928212fdcb3133a (diff) | |
download | sssd-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/tools')
-rw-r--r-- | src/tools/nscd.c | 2 |
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) { |