Exit on fork() failure

This commit is contained in:
Alex 2023-05-05 17:07:35 +03:00
parent 87c7e0f286
commit a280de7d73
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD

View File

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