[pacman-dev] [PATCH 2/2] replace fgets with fgets_eintr

Allan McRae allan at archlinux.org
Thu Aug 7 01:00:22 EDT 2014

On 07/08/14 07:13, Andrew Gregory wrote:
> The read() underlying fgets() can be interrupted by a signal handler causing
> fgets() to return NULL.  This was less of an issue in the past because signals
> generally resulted in the termination of the program, the recently added
> SIGWINCH handler does not.  Replace all fgets calls with a wrapper that retries
> on EINTR.
> Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
> ---
> fgets_eintr is a horrible name, suggestions welcome...


More information about the pacman-dev mailing list