Thread (39 messages) 39 messages, 3 authors, 2016-06-15

Re: [PATCH 4/4] send-pack: abort sideband demuxer on pack-objects error

flat view

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:51:02

On Donnerstag, 14. April 2011, Jeff King wrote:
So what do you want to do about the fd that needs closing? The options
I see are:

  1. Try for a general solution. That probably means the "close every
     descriptor in the child" hackiness that I mentioned earlier.

  2. Fix this case by having the async code close it if it was forked.
     It needs to know whether we forked, so we can:

       a. Use NO_PTHREADS. Easy and simple, though it does break
          start_async's abstraction a bit.

       b. Have start_async pass in a flag telling what happened. This
          really breaks the abstraction very similarly to (a), but it
          makes the connection more explicit.

I think I am leaning a bit towards (2a). It's simple, and it's not like
this is library code with a million unknown callers; fixing it simply
and cleanly with a nice commit message is probably sufficient.
(2a) would be good enough for my taste, too!

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help