Thread (13 messages) 13 messages, 2 authors, 2017-05-13

Re: [PATCH v7 09/10] sub-process: move sub-process functions into separate files

flat view

From: Jeff King <hidden>
Date: 2017-05-13 09:07:47

On Fri, May 05, 2017 at 11:28:01AM -0400, Ben Peart wrote:
quoted hunk ↗ jump to hunk
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help