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:
Michael Rash 2010-07-14 02:58:51 +00:00
parent 6f4ff9cb69
commit d904f5637f
2 changed files with 1 additions and 7 deletions

View File

@ -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 */

View File

@ -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))