mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-02 21:22:40 +00:00
Kill child when wait fails, so I_Error exits both
This commit is contained in:
parent
18943a24db
commit
8c0976a6cb
1 changed files with 6 additions and 1 deletions
|
|
@ -3052,9 +3052,13 @@ void I_Sleep(void)
|
|||
#ifdef NEWSIGNALHANDLER
|
||||
static void I_Fork(void)
|
||||
{
|
||||
int child;
|
||||
int status;
|
||||
int signum;
|
||||
switch (fork())
|
||||
|
||||
child = fork();
|
||||
|
||||
switch (child)
|
||||
{
|
||||
case -1:
|
||||
I_Error(
|
||||
|
|
@ -3067,6 +3071,7 @@ static void I_Fork(void)
|
|||
default:
|
||||
if (wait(&status) == -1)
|
||||
{
|
||||
kill(child, SIGKILL);
|
||||
I_Error(
|
||||
"Error setting up signal reporting: fork(): %s\n",
|
||||
strerror(errno)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue