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

Re: Mild bug?

From: William Uther <will+_at_cs.cmu.edu>
Date: 2002-07-03 22:11:39 CEST

On 3/7/02 3:53 PM, "Philip Martin" <philip@codematters.co.uk> wrote:

> Ben Collins-Sussman <sussman@collab.net> writes:
>> William Uther <will+@cs.cmu.edu> writes:
>>> Hi,
>>> If I make some changes to my working copy, and then run:
>>> $ svn diff | more
>>> And then kill the output halfway through ('q' in more), I get the following
>>> error from subversion:
>>> subversion/libsvn_subr/io.c:1200
>>> svn_error: #21088 : <Error calling external program>
>>> svn_io_run_cmd: error exitwhy 2 for process /usr/bin/diff
>> This has something to do with the way APR is spawning a child 'diff'
>> process, and the way we're displaying its output.
>> Many people more know more about this than I do. Philip? Brane? :-)
> When you terminate the more process you close the pipe between more
> and svn. The diff process inherits its stdout from the svn process,
> so when the pipe is closed the diff output is closed. When the diff
> process tries to write to the closed stream it receives SIGPIPE. The
> diff process does not attempt to handle SIGPIPE so the default
> behaviour, which is to abort the process, occurs. The svn function
> svn_io_run_cmd detects that the diff process has aborted and returns
> SVN_ERR_EXTERNAL_PROGRAM. This will cause the above error message to
> be output and the svn process to exit with EXIT_FAILURE.

I figured something like this was happening. Is this what we want to
happen? It seems strange to get a message on stdout simply because I didn't
read all the output.

Is this worth fixing, or is the answer: wait until the internal diff library
is finished :)


\x/ill :-}

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 3 22:12:36 2002

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.