On 2/28/19 10:21 AM, Eric Blake wrote:
> On 2/28/19 7:38 AM, co...@sdf.org wrote:
>> Hi folks,
>>
>> in Solaris 10 apparently O_CLOEXEC is not defined.
>> (got a bug report in http://gnats.netbsd.org/54025)
>>
>> Attached is a patch wrapping the code using it in #ifdef O_CLOEXEC.
> 
> Incomplete - if you are unable to atomically set the CLOEXEC flag during
> open() due to lack of O_CLOEXEC, then you should use
> fcntl(F_GETFD)/fcntl(F_SETFD) to set FD_CLOEXEC relatively soon after
> the open(), so that the fd is still properly closed on forks either way.

Not relevant. The use here is the loadable builtin to report and set
file descriptor flags (hence the `fdflags').


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to