[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 22:34:03 CEST

Ben Collins-Sussman <sussman@collab.net> writes:

> Philip Martin <philip@codematters.co.uk> writes:
>
> > 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.
>
> Wow, thank you for that crystal clear explanation!
>
> Should svn try to trap the specific error associated with an aborted
> diff process? Or is there some other more elegant solution?

svn *does* trap the aborted diff process, that's why you see the error
message. Did you mean ignore the aborted diff process and try to
carry on? Ignoring a failed diff would be the wrong thing to do.

Did you mean detect that diff has exited with SIGPIPE? APR doesn't
appear to allow us to determine which signal was received. Even if we
could detect it svn still has to exit. I suppose we could omit the
error message but I'm not sure it's an improvement.

-- 
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 22:34:40 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.