On Tue, Oct 23, 2001 at 05:46:56PM -0000, [EMAIL PROTECTED] wrote:
> trawick 01/10/23 10:46:56
>
> Modified: locks/unix proc_mutex.c
> Log:
> return the error that caused the operation to fail, not the current
> errno, since that could have been set due to some cleanup which
> didn't work (like trying to close a file that was never opened in
> the first place)
>
> Revision Changes Path
> 1.6 +1 -1 apr/locks/unix/proc_mutex.c
>
> Index: proc_mutex.c
> ===================================================================
> RCS file: /home/cvs/apr/locks/unix/proc_mutex.c,v
> retrieving revision 1.5
> retrieving revision 1.6
> diff -u -r1.5 -r1.6
> --- proc_mutex.c 2001/10/19 23:25:28 1.5
> +++ proc_mutex.c 2001/10/23 17:46:56 1.6
> @@ -401,7 +401,7 @@
>
> if (rv != APR_SUCCESS) {
> proc_mutex_fcntl_cleanup(new_mutex);
> - return errno;
> + return rv;
> }
>
> new_mutex->curr_locked = 0;
locks/unix/crossproc.c:392 is still using errno, should this be changed
as well to only rely on apr_file_mktemp's return value?
if (rv != APR_SUCCESS) {
apr_status_t stat = errno;
fcntl_cleanup(new);
return stat;
}
(also, as Roy brought up recently, we shouldn't be using "stat" as an
identifier. This was probably my fault, so I'll just fix it.)
-aaron