Re: [dev] [PATCH] Change an eprintf to a die to stop child from running its own slideshow

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Thu, 14 Jan 2016 10:11:22 +0000

On Thu, Jan 14, 2016 at 11:01:16AM +0100, Kamil CholewiƄski wrote:
> > Otherwise we can use the approach in sbase which is to have eprintf()
> > be equivalent to die() and weprintf() for just the warning version.
>
> TBH I would find this behavior extremely confusing. The established
> conventions seem to be:
>
> printf - format string and write to stdout
> sprintf - format string and put result in buffer
> fprintf - format string and write to fd
> [... snip 47 other variants ...]
>
> Contrast with:
>
> eprintf - format string and write to stderr and exit
>
> "printf" implies formatting / printing and nothing else. Using one of
> "die", "err", etc would be much clearer.

It depends on your background. eprintf() and weprintf() were written by
Rob Pike and Kernighan and used in the book "The Practice of Programming".
Received on Thu Jan 14 2016 - 11:11:22 CET

This archive was generated by hypermail 2.3.0 : Thu Jan 14 2016 - 11:12:17 CET