Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ __fw3_command_pipe(bool silent, const char *command, ...)

execv(command, args);

/* Only reach on execv failure - must exit to prevent child continuing */
warn("Unable to execute %s: %s", command, strerror(errno));
_exit(1);

default:
signal(SIGPIPE, SIG_IGN);
pipe_pid = pid;
Expand Down Expand Up @@ -771,7 +775,7 @@ fw3_hotplug(bool add, void *zone, void *device)
switch (fork())
{
case -1:
warn("Unable to fork(): %s\n", strerror(errno));
warn("Unable to fork(): %s", strerror(errno));
return false;

case 0:
Expand All @@ -794,8 +798,8 @@ fw3_hotplug(bool add, void *zone, void *device)

execl(FW3_HOTPLUG, FW3_HOTPLUG, "firewall", NULL);

/* unreached */
return false;
/* Only reach on execl() failure - must exit to prevent child continuing */
_exit(1);
}

int
Expand Down