Currently there are no need for running the process asynchronously on
background, so we might just make it run synchronously instead. This
simplifies the calling convention and also removes completely the need
to fork and possibly race in glibc functions.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
- if ((child = do_fork()))
- return child;
-
child = run_piped(cmd, argv, NULL, &ofd, &efd);
FD_ZERO(&rfds);
child = run_piped(cmd, argv, NULL, &ofd, &efd);
FD_ZERO(&rfds);
add_arg(args, argcnt, argstr, idx, "COMMENT: %s\\c", timestamp);
add_arg(args, argcnt, argstr, idx, "COMMENT: %s\\c", timestamp);
- pid = run(cmd, args);
- harvest_zombies(pid);
rename(tmpfile, image->image_filename);
rename(tmpfile, image->image_filename);
sanitize_rrd_update_data(data + l);
write_to_logfile(rrd, data);
sanitize_rrd_update_data(data + l);
write_to_logfile(rrd, data);
- pid = run(cmd, cmdline);
- harvest_zombies(pid);
}
if (rrd->pre_draw_cmd && !strcmp(rrd->pre_draw_cmd[0], "shell")) {
}
if (rrd->pre_draw_cmd && !strcmp(rrd->pre_draw_cmd[0], "shell")) {
- pid = run(rrd->pre_draw_cmd[1], &rrd->pre_draw_cmd[1]);
- harvest_zombies(pid);
+ run(rrd->pre_draw_cmd[1], &rrd->pre_draw_cmd[1]);
// char cmd[] = "echo";
char *args[512], argstr[ARGSTR_LEN];
int idx = 0, argcnt = 0;
// char cmd[] = "echo";
char *args[512], argstr[ARGSTR_LEN];
int idx = 0, argcnt = 0;
if (!db->filename) {
pr_err("Database %s missing database filename\n", db->name);
if (!db->filename) {
pr_err("Database %s missing database filename\n", db->name);
- child = run(cmd, args);
-
- harvest_zombies(child);