[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 01 Feb 2016 10:41:04 +0000

Daniel Shahaf <d.s_at_daniel.shahaf.name> writes:

> philip_at_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
Received on 2016-02-01 11:41:22 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.