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", $$'

Reply via email to