mirror of
https://github.com/git/git.git
synced 2026-01-10 01:56:42 +00:00
compat/mingw: allow sigaction(SIGCHLD)
A future change will start using sigaction to setup a SIGCHLD signal handler. The current code uses signal(), which returns SIG_ERR (but doesn't seem to set errno) so instruct sigaction() to do the same. A new SA flag will be needed, so copy the one from Cygwin; note that the sigaction() implementation that is provided won't use it, so its value is otherwise irrelevant. Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
cb3b40381e
commit
ef03aa432a
@@ -2561,7 +2561,9 @@ int setitimer(int type UNUSED, struct itimerval *in, struct itimerval *out)
|
||||
|
||||
int sigaction(int sig, struct sigaction *in, struct sigaction *out)
|
||||
{
|
||||
if (sig != SIGALRM)
|
||||
if (sig == SIGCHLD)
|
||||
return -1;
|
||||
else if (sig != SIGALRM)
|
||||
return errno = EINVAL,
|
||||
error("sigaction only implemented for SIGALRM");
|
||||
if (out)
|
||||
|
||||
Reference in New Issue
Block a user