You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2004/01/20 16:11:01 UTC

Broken pipe

On head of trunk on SuSE Linux 9, "svn log | head" aborts with "svn: Can't write to stream: Broken pipe" after displaying the ten lines of correct output.  I think this is a serious unfriendliness which I would not like to see in release 1.0, though it is getting a bit late for such changes.  I thought this had been discussed and perhaps resolved a few weeks ago.  Perhaps not.  At least I think a consensus was reached that it should die quietly and the way to achieve this was known.

I can't find "pipe" mentioned in any issue summary nor the STATUS file.  What is the status of this?

- Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Broken pipe

Posted by Tobias Ringstrom <to...@ringstrom.mine.nu>.
Jack Repenning wrote:
> 
> I think there's overwhelming precedent for suppressing the message.  I 
> tried a few commands, and couldn't find any that whine in these 
> circumstances.  For example:
> 
> grep -lr . . | head
> find . | head

Yes and no. These commands are simple enough that they do not need to 
shut down gracefully, so they do neither handle nor ignore SIGPIPE, and 
are thus instantly killed by it. That's why there is not error message.

> Also interesting, these commands terminate quietly:
> 
> svn stat --verbose | head
> svn ls -Rv | head
> svn info -R | head

That is because these commands are using printf without checking the 
return value, which means that even if there is no more output, the 
commands keep running until normal exit (or it's killed using e.g. 
ctrl-c). We need to fix that. The status one is a bit harder to fix 
because the print_status callback cannot not return an error.

> OTOH, I'm having a hard time seeing this as critical. If it were a month 
> or two ago, I'd be all over suppressing the message; at this point, I'm 
> feeling like I could live with that until 1.0.1 or so....

I agree. The lack of an error return value in the print_status callback 
is... sigh... yet another API problem.

/Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Broken pipe

Posted by Jack Repenning <jr...@collab.net>.
On Jan 20, 2004, at 8:51 AM, Tobias Ringstrom wrote:

> Julian Foad wrote:
>> On head of trunk on SuSE Linux 9, "svn log | head" aborts with "svn: 
>> Can't write to stream: Broken pipe" after displaying the ten lines of 
>> correct output.  I think this is a serious unfriendliness which I 
>> would not like to see in release 1.0, though it is getting a bit late 
>> for such changes.  I thought this had been discussed and perhaps 
>> resolved a few weeks ago.  Perhaps not.  At least I think a consensus 
>> was reached that it should die quietly and the way to achieve this 
>> was known.
>> I can't find "pipe" mentioned in any issue summary nor the STATUS 
>> file.  What is the status of this?
>
> Before 0.36, the client just died, which caused wedged repositories. 
> From 0.36 on, the client gets a read error and prints it using the 
> normal mechanism. I cannot remember any consensus (or even strong 
> opinions) on whether the error message should be suppressed or not. It 
> would probably be nice to suppress it, but I would prefer some more 
> discussion first.

I think there's overwhelming precedent for suppressing the message.  I 
tried a few commands, and couldn't find any that whine in these 
circumstances.  For example:

grep -lr . . | head
find . | head

Also interesting, these commands terminate quietly:

svn stat --verbose | head
svn ls -Rv | head
svn info -R | head

I think maybe "svn log" is all alone in this;-)

OTOH, I'm having a hard time seeing this as critical. If it were a 
month or two ago, I'd be all over suppressing the message; at this 
point, I'm feeling like I could live with that until 1.0.1 or so....

-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835.8090


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Broken pipe

Posted by Tobias Ringstrom <to...@ringstrom.mine.nu>.
Julian Foad wrote:
> On head of trunk on SuSE Linux 9, "svn log | head" aborts with "svn: 
> Can't write to stream: Broken pipe" after displaying the ten lines of 
> correct output.  I think this is a serious unfriendliness which I would 
> not like to see in release 1.0, though it is getting a bit late for such 
> changes.  I thought this had been discussed and perhaps resolved a few 
> weeks ago.  Perhaps not.  At least I think a consensus was reached that 
> it should die quietly and the way to achieve this was known.
> 
> I can't find "pipe" mentioned in any issue summary nor the STATUS file.  
> What is the status of this?

Before 0.36, the client just died, which caused wedged repositories. 
 From 0.36 on, the client gets a read error and prints it using the 
normal mechanism. I cannot remember any consensus (or even strong 
opinions) on whether the error message should be suppressed or not. It 
would probably be nice to suppress it, but I would prefer some more 
discussion first.

/Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org