if (verbose) printf("INFO: Host %s stopped responding. Executing DOWN command.\n", host->name);
host->host_up = false;
if (!fork()) {
- system(host->down_cmd);
- exit(EXIT_SUCCESS);
+ int sys_ret = system(host->down_cmd);
+ exit(sys_ret);
}
}
if (verbose) printf("INFO: Host %s started responding. Executing UP command.\n", host->name);
host->host_up = true;
if (!fork()) {
- system(host->up_cmd);
- exit(EXIT_SUCCESS);
+ int sys_ret = system(host->up_cmd);
+ exit(sys_ret);
}
}
} else {