Change-Id: Iec382fb152dcbcd3bf5511ce19c4235679365c75
struct stat sts;
volatile int error = 0;
pid_t pid;
+ int rv = 0;
+ dbg("run_notify");
if (stat(argv[0], &sts) == -1 && errno == ENOENT) {
infomsg(infomode, "notify file: %s : not exist.", argv[0]);
error = errno;
_exit(111);
}
- if (error) {
- waitpid(pid, NULL, 0);
- errno = error;
- }
- dbg("script complete.\n");
+ waitpid(pid, &rv, 0);
+ errno = error;
+ dbg("wait pid (%u) rv (%d)", pid, rv);
}
static void write_leasefile(void)