bug-bash
[Top][All Lists]
Advanced

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

Re: Fix compilation on Solaris 10


From: Chet Ramey
Subject: Re: Fix compilation on Solaris 10
Date: Thu, 28 Feb 2019 10:39:22 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 2/28/19 10:21 AM, Eric Blake wrote:
> On 2/28/19 7:38 AM, coypu@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    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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