mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
One more from waitpid() audit: Correctly interpret waitstatus when a
child fails. Possibly this was causing smbmount to exit(0) when it really should have indicated a failure.
This commit is contained in:
parent
82e4bb598c
commit
1e33083fe6
@ -78,8 +78,12 @@ static void daemonize(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we get here - the child exited with some error status */
|
/* If we get here - the child exited with some error status */
|
||||||
exit(status);
|
if (WIFSIGNALLED(status))
|
||||||
|
exit(128 + WTERMSIG(status));
|
||||||
|
else
|
||||||
|
exit(WEXITSTATUS(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
signal( SIGTERM, SIG_DFL );
|
signal( SIGTERM, SIG_DFL );
|
||||||
|
Loading…
Reference in New Issue
Block a user