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

Re: [Patch] configure.in and GNU diff/patch (was Re: r727 doesn't build w/ --disable-shared)

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-01-09 01:59:49 CET

On Tue, Jan 08, 2002 at 07:50:14PM -0500, Kevin Pilch-Bisson wrote:

> > which turns out to be 255, which i imagine it some kind of error code
> > for this sort of thing.
>
> WEXITSTATUS will return the least significant byte of the error as an int.
> Therefor 0xFFFFFFFFFFFF gets truncated to 0xFFFF which is the 255. As far as
> I know there is know way for apr to be able to portably be able to tell that
> an executable didn't run (other than to stat it first).

ahh, ok, that makes sense now.

> Just be happy there is a return code. I had to fight for it :)

well, thanks for fighting, it's better than nothing...

> > now the question is what to do about it. i have a patch that will
> > just handle this for SVN_CLIENT_DIFF. we can just check that diff
> > exited with either 0, 1, or 2 (the only exit codes it is supposed to
> > use, according to it's man page), and if it exits with something else,
> > we know there's a problem and we error out.
> >
> +1 for this approach. We should also be doing something similar when we run
> patch. In fact I beleive there are/were comments to the effect of
>
> /* ### need to do better handling of the exit status diff left us here. */

ok, i'll put that patch together again and send it off as soon as the
recent diff breakage is fixed (no reason to send the patch and then
imediately have to recreate it if any of the files change...).

> > that seems kind of ugly though, and it seems like there must be some
> > kind of facility in apr for checking for this condition, or if there
> > isn't, there should be.
> >
> > unfortunately, i can't find it, and if it isn't there now i'm not sure
> > how one should implement it.
> >
> Don't think there is one, and I'm not sure how it would be implemented other
> than stating to make sure the file is there and checking
> finfo.protection & APR_[UGO]EXECUTE.

i thought of that, but then you just get a race condition between your
stat and your exec.

i guess the only way we can deal with this kind of thing is to know
what kind of return values we should be getting and to assume an error
occured if we get anything else.

-garrett

-- 
garrett rooney                     Unix was not designed to stop you from 
rooneg@electricjellyfish.net       doing stupid things, because that would  
http://electricjellyfish.net/      stop you from doing clever things.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:55 2006

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.