bug-gnulib
[Top][All Lists]
Advanced

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

Re: Retrying close() after error on Linux !?


From: Paul Eggert
Subject: Re: Retrying close() after error on Linux !?
Date: Wed, 14 Mar 2018 11:06:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/14/2018 10:52 AM, Bruno Haible wrote:
This is an interesting, creative idea. However, because few people use this
'dup2 as a kind of atomic close' workaround, I fear that it might lead us
into the proximity of OS bugs. Hardly anyone has tested how dup2 works
in the presence of signals and ttys, in the past.

For what it's worth, in Emacs I wrote the attached code (in src/sysdep.c) and it seems to have worked well enough for Emacs so far. Perhaps something like this should be Gnulibified, and the rest of Gnulib should call posix_close.

Attachment: posix_close.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]