Re: [PATCH v7 09/10] sub-process: move sub-process functions into separate files
- From
Jeff King <peff@peff.net>
- Date
- May 13, 2017, 09:07 UTC
- Message-ID
- <20170513090740.xldv4td3omhg3gxc@sigill.intra.peff.net>
- In-Reply-To
- <20170505152802.6724-10-benpeart@microsoft.com>
On Fri, May 05, 2017 at 11:28:01AM -0400, Ben Peart wrote:
Show 10 quoted lines
> +static void subprocess_exit_handler(struct child_process *process)
> +{
> + sigchain_push(SIGPIPE, SIG_IGN);
> + /* Closing the pipe signals the subprocess to initiate a shutdown. */
> + close(process->in);
> + close(process->out);
> + sigchain_pop(SIGPIPE);
> + /* Finish command will wait until the shutdown is complete. */
> + finish_command(process);
> +}This isn't a new issue with your series, but the SIGPIPEs here seem odd. I don't think you can get SIGPIPE from closing descriptors.
I suspect this is a hold-over from when Lars' original design, where we actually sent an "exit" message to the filter. It's not hurting anything, and I don't think it's worth holding up your series for. But when you are working in this area further, it might be worth cleaning up.
-Peff