notifyd: check for pid errors and report them
Spotted by Coverity Scan
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com> --- :100644 100644 133706f... 7b625c9... M cman/notifyd/main.c cman/notifyd/main.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cman/notifyd/main.c b/cman/notifyd/main.c index 133706f..7b625c9 100644 --- a/cman/notifyd/main.c +++ b/cman/notifyd/main.c @@ -207,7 +207,7 @@ static void dispatch_notification(const char *str, int *quorum) int envptr = 0; int argvptr = 0; char scratch[PATH_MAX]; - pid_t notify_pid; + pid_t notify_pid, pid; int pidstatus; int err = 0; @@ -248,7 +248,10 @@ static void dispatch_notification(const char *str, int *quorum) break; default: /* parent */ - waitpid(notify_pid, &pidstatus, 0); + pid = waitpid(notify_pid, &pidstatus, 0); + if (pid < 0) + logt_print(LOG_ERR, "Error waiting for " SBINDIR "/cman_notify execution "); + break; } -- 1.7.4.4 |
| All times are GMT. The time now is 11:00 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.