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

About them "broken pipes"

From: Jack Repenning <jrepenning_at_collab.net>
Date: 2007-09-27 03:02:14 CEST

A long, long time ago (2004-01-20), Julian Foad remarked:

> 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.

A very short discussion ensued (see <http://tinyurl.com/2etm8m>). I
guess it's also related to this one: <http://tinyurl.com/2f4a8q>.
Since those discussions, the problem has spread: some commands that
were noted at the time as not displaying this problem now do.

There's also a lot of speculation in those discussions relating to
the exact shape of the various bits of code that lead to these
behaviors. That seems to me off-base. The code exists to create an
effect, not to justify it. The effect is justified (or, as I think
in this case, unjustified) based on what it ought to do, what the
user has requested and what they got. Subversion is reporting
"broken pipe" because it receives a broken pipe signal. It receives
a broken pipe signal because the program at the consumer end of the
pipe ("head" or similar) has terminated, which closes its end of the
pipe, which is the whole reason the "broken pipe" signal was
invented. So svn is telling the truth, no questions there.

The question that remains is: just how much of this truth telling
should it actually be doing? Programs (and commands like "log"),
that produce output expected to be read by humans, should be prepared
for the possibility that the humans will use something like "head" or
"more" or "less," something that allows them to terminate the display
prematurely. A two-line gobbledygook message is not a friendly way
of telling the human "exactly what you wanted to happen did in fact
happen."

Classic Unix commands of this sort all respond to the event
silently. So, too, should svn.

Don't you think?

-==-
Jack Repenning
Chief Technology Officer
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
office: +1 650.228.2562
mobile: +1 408.835.8090
raindance: +1 877.326.2337, x844.7461
aim: jackrepenning
skype: jrepenning

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 27 03:02:24 2007

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.