mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-31 16:57:58 +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))
|
if (WIFEXITED(status))
|
||||||
{
|
{
|
||||||
print("Child process exited with code: %d\n", WEXITSTATUS(status));
|
print("Child process exited with code: %d\n", WEXITSTATUS(status));
|
||||||
|
return WEXITSTATUS(status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print("Execution failed.\n");
|
print("Execution failed.\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user