bug-gnulib
[Top][All Lists]
Advanced

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

Re: portability of fopen and 'e' (O_CLOEXEC) flag


From: Eric Blake
Subject: Re: portability of fopen and 'e' (O_CLOEXEC) flag
Date: Mon, 11 May 2020 12:41:12 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 5/11/20 11:37 AM, Bruno Haible wrote:


POSIX [2][3], macOS [4], FreeBSD [5], Solaris [6] don't support this 'e' flag.

Although it _is_ slated to be added in a future revision of POSIX:

https://www.austingroupbugs.net/view.php?id=411


How about using open() with O_CLOEXEC, and then fdopen()?

In the meantime, this is indeed more portable.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

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