[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-07-03 21:53:24 CEST

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.

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 3 21:54:09 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.