subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Martin <philip.mar...@wandisco.com>
Subject Re: svn commit: r1727621 - in /subversion/trunk/subversion: svn/svn.c svnadmin/svnadmin.c svnbench/svnbench.c svnfsfs/svnfsfs.c svnlook/svnlook.c svnrdump/svnrdump.c svnsync/svnsync.c
Date Mon, 01 Feb 2016 10:41:04 GMT
Daniel Shahaf <d.s@daniel.shahaf.name> writes:

> philip@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

Mime
View raw message