Re: Funny: git -p submodule summary
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Jan 12, 2009, 12:00 UTC
- Message-ID
- <496B30C5.2060207@viscovery.net>
- In-Reply-To
- <20090112112109.GA3825@coredump.intra.peff.net>
Jeff King schrieb:
> Hrm. How do you properly detect "killed by SIGINT" on Windows?
Good question. The exit code is 0xc000013a if the signal was generated by hitting Ctrl-C (tested with 'git --no-pager log'), but it is 3 if the signal was "generated" by 'raise(SIGINT)'. The implementation of the latter just calls _exit(3) (same for other deadly signals). Wow!
Show 16 quoted lines
>> -#define SIGKILL 0 >> -#define SIGCHLD 0 >> -#define SIGPIPE 0 >> -#define SIGHUP 0 >> -#define SIGQUIT 0 >> -#define SIGALRM 100 >> +#define SIGHUP 1 >> +#define SIGQUIT 3 >> +#define SIGKILL 9 >> +#define SIGPIPE 13 >> +#define SIGALRM 14 >> +#define SIGCHLD 17 > > Don't these get fed to signal()? Does Windows really not care about > getting bogus numbers versus 0 (which is, admittedly, bogus itself)? Or > are we just ignoring the return code everywhere?
Windows's signal() does return EINVAL; appearently, we never check the return code. :-P
-- Hannes