Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/tests/kernel

On Tue, Feb 19, 2013 at 02:45:43PM -0500, Julio Merino wrote:
> On Tue, Feb 19, 2013 at 2:43 PM, Joerg Sonnenberger
> <> wrote:
> > On Tue, Feb 19, 2013 at 11:40:22AM -0800, Paul Goyette wrote:
> >> Most of the printf's were already there before this round of
> >> updates, and there's enough differentiation in them to figure out
> >> which process is responsible.  In any case, the printf's aren't
> >> critical to the test (until you need to debug it!).
> >
> > I am talking about the *new* printf in the child process.
> > That should just be a plain write to STDERR_FILENO, it doesn't even have
> > to include any more error details.
> This is pure curiosity: isn't a fflush(stderr) right before the fork()
> enough to make printf() safe in the child? If not, why not?

Depends on the buffering mode it is in. Basically, I consider it a bad
style that should be avoided.


Home | Main Index | Thread Index | Old Index