Skip to content

Commit 7c35edf

Browse files
committed
Exit with failure from detached fork.
If detached fork can not execve program then exit from this fork with failure.
1 parent 70deeae commit 7c35edf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ main(int argc, char **argv)
204204
setns(netfd, CLONE_NEWNET);
205205
drop_priv(cred.uid, &pw);
206206
if (execve(program, (char * const *)args, (char * const *)envs) == -1)
207-
perror(0);
207+
return EXIT_FAILURE;
208208
}
209209
else
210210
waitpid(child, 0, 0);

0 commit comments

Comments
 (0)