removed additional wait() call from run_extcmd(), updated --fw-list to just use system() to execute the iptables listing commands
git-svn-id: file:///home/mbr/svn/fwknop/trunk@261 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
parent
6f4ff9cb69
commit
d904f5637f
@ -79,12 +79,6 @@ _run_extcmd(uid_t user_uid, char *cmd, char *so_buf, size_t so_buf_sz, int timeo
|
||||
log_msg(LOG_ERR, "run_extcmd: fork failed: %s", strerror(errno));
|
||||
return(EXTCMD_FORK_ERROR);
|
||||
}
|
||||
if (pid > 0)
|
||||
{
|
||||
/* we are the parent
|
||||
*/
|
||||
wait(NULL);
|
||||
}
|
||||
else if (pid == 0)
|
||||
{
|
||||
/* We are the child */
|
||||
|
||||
@ -157,7 +157,7 @@ fw_dump_rules(fko_srv_options_t *opts)
|
||||
);
|
||||
|
||||
//printf("(%i) CMD: '%s'\n", i, cmd_buf);
|
||||
res = run_extcmd(cmd_buf, NULL, 0, 0);
|
||||
res = system(cmd_buf);
|
||||
|
||||
/* Expect full success on this */
|
||||
if(! EXTCMD_IS_SUCCESS(res))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user