Re: [PATCH] Fix start_command closing cmd->out/in regardless of cmd->close_out/in

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ping Yin <pkufranky@...>
Cc: Johannes Sixt <j.sixt@...>, <git@...>
Date: Wednesday, November 21, 2007 - 5:11 am

"Ping Yin" <pkufranky@gmail.com> writes:


I do not know about "natural".  That largely would depend on
where one starts thinking about the issues from.

But I think an API definition that says "These fds are closed
after the call, so if you are going to use them, you can dup()
them beforehand" is equally valid, and I suspect that forgetting
to dup() is easier to detect than forgetting to close() --- you
will notice the former mistake immediately because your read and
write say "oops, nobody on the other end" but the latter mistake
will result in a hung process.  And for that reason, I think it
can be called more "graceful".  So ...


... I do not necessarily agree that your patch is correcting the
misbehaviour.

-
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] Fix start_command closing cmd->out/in regardl..., Junio C Hamano, (Wed Nov 21, 5:11 am)