mirror of
https://github.com/Fennix-Project/Userspace.git
synced 2025-05-25 22:14:28 +00:00
Exit on fork() failure
This commit is contained in:
parent
87c7e0f286
commit
a280de7d73
@ -65,10 +65,12 @@ int main(int argc, char *argv[], char *envp[])
|
||||
if (WIFEXITED(status))
|
||||
{
|
||||
print("Child process exited with code: %d\n", WEXITSTATUS(status));
|
||||
return WEXITSTATUS(status);
|
||||
}
|
||||
else
|
||||
{
|
||||
print("Execution failed.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user