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

Re: svn commit: r8204 - branches/1.0-stabilization

From: Tobias Ringstrom <tobias_at_ringstrom.mine.nu>
Date: 2004-01-09 10:23:24 CET

Greg Hudson wrote:
> On Thu, 2004-01-08 at 21:01, gstein@tigris.org wrote:
>
>>+ * Issue #1693
>>+ Improved signal handling for svnadmin, svnlook and svn
>>+ Justification: Avoids uncontrolled termination resulting in
>>+ wedged repositories. API change. Low risk.
>>+ Votes:
>>+ +1: bliss, rooneg, ghudson
>>+ -1: gstein
>>+ -- seems like a SIGPIPE should cause a graceful exit, rather
>>+ than to have it continue chewing CPU.
>
> We ignore SIGPIPE in clients/cmdline/main.c as well. An actual output

Hmm... That change is in this patch. I think you meant svnserve.

> error will result in an EPIPE, leading to an I/O error, leading to a
> graceful exit.

Exactly. The Subversion code checks the status of all write commands.
Since SIGPIPE can only occur when writing to a file descriptor, we
cannot handle the error any faster by installing a signal handler.

The write error also gives us a better error message. Please let me
demonstrate how it works with the patch installed:

> svnlook cat repos trunk/INSTALL | head -5

                ======================================
                   INSTALLING AND USING SUBVERSION
                       A Guide for Newcomers
                ======================================
svn: Can't write to stream: Broken pipe

Many unix utilities suppress the output of the broken pipe error
message. We can do that too later if we want to of course.

/Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 9 10:24:03 2004

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.