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

Re: Spuriously failing hook scripts

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2006-09-13 12:57:16 CEST

On Wed, Sep 13, 2006 at 10:20:27AM +0100, Malcolm Rowe wrote:
> We should definitely fix the error-reporting problem. It's probably
> sufficient to change 'if (APR_STATUS_IS_CHILD_NOTDONE(apr_err)' to 'if
> (!APR_STATUS_IS_CHILD_DONE(apr_err))' - most likely we didn't expect
> to receive any other errors than APR_CHILD_DONE - the APR documentation
> doesn't mention that any others are possible, though both Unix and Win32
> implementations can return OS errors).
>

Something like the below.

Anyone see any reason not to commit this, at least?

[[[
* subversion/libsvn_subr/io.c
  (svn_io_wait_for_cmd): Return an error if apr_proc_wait() returns any
    status other than APR_CHILD_DONE (for example, ECHILD), rather than
    returning an error only if it returns APR_CHILD_NOT_DONE.
]]]

Regards,
Malcolm

Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c (revision 21477)
+++ subversion/libsvn_subr/io.c (working copy)
@@ -2104,7 +2104,7 @@ svn_io_wait_for_cmd(apr_proc_t *cmd_proc
 
   /* Wait for the cmd command to finish. */
   apr_err = apr_proc_wait(cmd_proc, &exitcode_val, &exitwhy_val, APR_WAIT);
- if (APR_STATUS_IS_CHILD_NOTDONE(apr_err))
+ if (!APR_STATUS_IS_CHILD_DONE(apr_err))
     return svn_error_wrap_apr(apr_err, _("Error waiting for process '%s'"),
                               cmd);
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 13 12:57:49 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.