Daniel Shahaf <d...@daniel.shahaf.name> writes: > phi...@apache.org wrote on Fri, Jan 29, 2016 at 18:55:22 -0000: >> +#ifndef WIN32 >> + /* If cancelled by SIGINT then attempt to exit via SIGINT. This >> + allows the shell to use WIFSIGNALED and WTERMSIG to detect the >> + SIGINT. See http://www.cons.org/cracauer/sigint.html */ >> + if (cancelled && apr_signal(SIGINT, SIG_DFL) == APR_SUCCESS) >> + /* No APR support for getpid() so cannot use apr_proc_kill(). */ >> + kill(getpid(), SIGINT); >> +#endif > > Should this be done for other signals we catch? (Those signals are > SIGTERM, SIGHUP, and SIGBREAK.) Shells handle those values of > WTERMSIG() too: > > % perl -e 'kill "TERM", $$' > zsh: terminated perl -e 'kill "TERM", $$'
That change is broken for two reasons: - the same handler is used for all those signals but we always exit via SIGINT - except apr_signal does not return APR_SUCCESS so we never exit via SIGINT. -- Philip Martin WANdisco