int maxfd;
int eof = 0;
- if ((child = do_fork()))
- return child;
-
child = run_piped(cmd, argv, NULL, &ofd, &efd);
FD_ZERO(&rfds);
harvest_zombies(child);
- exit(1);
return 0;
}
add_arg(args, argcnt, argstr, idx, "COMMENT: %s\\c", timestamp);
- pid = run(cmd, args);
- harvest_zombies(pid);
+ run(cmd, args);
rename(tmpfile, image->image_filename);
sanitize_rrd_update_data(data + l);
write_to_logfile(rrd, data);
- pid = run(cmd, cmdline);
- harvest_zombies(pid);
+ run(cmd, cmdline);
}
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]);
}
if (rrd->images)
// char cmd[] = "echo";
char *args[512], argstr[ARGSTR_LEN];
int idx = 0, argcnt = 0;
- int child, i;
+ int i;
if (!db->filename) {
pr_err("Database %s missing database filename\n", db->name);
db->archives[i].rows);
}
- child = run(cmd, args);
-
- harvest_zombies(child);
+ run(cmd, args);
return 0;
}