> Doing this with reference counting is tricky.  It looks like if in
> channel_set_pipes() the may_close_part() actually closes an fd, then
> ch_to_be_closed is not decremented.  Also, when debugging it's hard to
> see what happened.  I think it would work to have a bitmask:  Set the
> bit for the part that's opened, reset it when closed or when an error
> was detected on the part.  When the bitmask is zero we are done with the
> channel.
> 
> The message in channel_close_on_error() that the read failed should
> happen on every read fail.  Thus if there is an error on stdout but
> stderr is still readable, it should log "cannot read from stdout".
> Otherwise we don't know what is happening.

Thank you. I updated patch.

https://gist.github.com/ichizok/6e0c00daf387b32bebcc2972f0cca137

- handle "ch_to_be_closed" as bitset.
- modified "ch_close_part_on_error()" logging, shows reason (EOF or error).

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui