Thread (4 messages) flat view 4 messages, 3 authors, 2017-02-10

Re: [PATCH v5] gc: ignore old gc.log files

From: Jeff King <hidden>
Date: 2017-02-10 21:32:33

On Fri, Feb 10, 2017 at 09:23:15PM +0000, David Turner wrote:
quoted
Speaking of stderr, I wonder if this function should be calling
fflush(stderr) before looking at the fstat result. There could be contents buffered
there that haven't been written out yet (not from child processes, but perhaps
ones written in this process itself).
Probably unlikely in practice, since stderr is typically unbuffered by default.
Process_log_file_at_exit calls fflush.  Will fix the other.
Ah, good. That makes sense, since we might deadlock if we do it in a
signal handler. Perhaps that is a reason not to use stderr here again
(though if we want to be that careful, a new fdopen() call is also a bad
idea, as we can deadlock over the malloc() lock; you'd have to snprintf
to a small buffer and dump it with write()).

-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