Re: [PATCH 2/2] close_lock_file(): new function in the lockfile API

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Linus Torvalds <torvalds@...>, Git Mailing List <git@...>, Alex Riesen <raa.lkml@...>, Kristian Høgsberg <krh@...>
Date: Wednesday, January 16, 2008 - 7:08 pm

Junio C Hamano wrote:

yes.


Most of that patch is straight forward, just removing close().

I think you should consider how to handle fdopen on the lock
descriptor and the fact that start_command closes the lock
file descriptor in create_bundle().

After we fdopen, we should always fclose() and never close().
This isn't enforced.

I merely assigned the file descriptor to -1 when it was safe
(i.e. after fclose), and added a comment. We could add another
function which did this automatically, but maybe that is too
much effort, especially in the bundle case.

-brandon

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 2/2] close_lock_file(): new function in the lockf..., Brandon Casey, (Wed Jan 16, 7:08 pm)
[PATCH 1/2] Document lockfile API, Junio C Hamano, (Wed Jan 16, 3:00 pm)