Re: [PATCH] Call clearerr() on stdout before close_stream() is called.

2016-02-04 Thread Eric Blake
On 02/04/2016 03:46 AM, David Cantrell wrote: > This is seen in bison and possibly other programs. Bison will > incorrectly receive SIGPIPE and terminate because close_stream() is > picking up a rogue EPIPE in errno. Before fclose(), clearerr(stdout) > needs to be called so that the errors it wil

[PATCH] Call clearerr() on stdout before close_stream() is called.

2016-02-04 Thread David Cantrell
This is seen in bison and possibly other programs. Bison will incorrectly receive SIGPIPE and terminate because close_stream() is picking up a rogue EPIPE in errno. Before fclose(), clearerr(stdout) needs to be called so that the errors it will check for are for the immediate call of close_stream