bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* portability of fopen and 'e' (O_CLOEXEC) flag
@ 2020-05-11 14:49 Tim Rühsen
  2020-05-11 16:37 ` Bruno Haible
  0 siblings, 1 reply; 14+ messages in thread
From: Tim Rühsen @ 2020-05-11 14:49 UTC (permalink / raw)
  To: bug-gnulib


[-- Attachment #1.1: Type: text/plain, Size: 405 bytes --]

Hi,

i would like to ask for your expert knowledge.

How to prevent file descriptor leaks in a multi-threaded application
that fork+exec. Quick answer is surely "use O_CLOEXEC" to close those
file descriptors on exec.

But how does this work with fopen in a portable way ?
GNU libc has the 'e' flag for exactly this.

How about other non-GNU OSes / alternative C libraries ?

Regards, Tim


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-05-29  6:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 14:49 portability of fopen and 'e' (O_CLOEXEC) flag Tim Rühsen
2020-05-11 16:37 ` Bruno Haible
2020-05-11 17:41   ` Eric Blake
2020-05-12  8:28   ` Tim Rühsen
2020-05-24 19:22     ` Bruno Haible
2020-05-26  6:01       ` Daiki Ueno
2020-05-26  8:18         ` Bruno Haible
2020-05-26 16:09           ` Bruno Haible
2020-05-27 18:39             ` Bruno Haible
2020-05-28 10:00               ` Daiki Ueno
2020-05-28 10:04                 ` Daiki Ueno
2020-05-28 11:54                   ` Bruno Haible
2020-05-29  3:04                     ` Daiki Ueno
2020-05-29  6:25                       ` Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).