[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
portability of fopen and 'e' (O_CLOEXEC) flag
From: |
Tim Rühsen |
Subject: |
portability of fopen and 'e' (O_CLOEXEC) flag |
Date: |
Mon, 11 May 2020 16:49:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
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
signature.asc
Description: OpenPGP digital signature
- portability of fopen and 'e' (O_CLOEXEC) flag,
Tim Rühsen <=
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/11
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Eric Blake, 2020/05/11
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Tim Rühsen, 2020/05/12
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/24
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Daiki Ueno, 2020/05/26
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/26
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/26
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Bruno Haible, 2020/05/27
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Daiki Ueno, 2020/05/28
- Re: portability of fopen and 'e' (O_CLOEXEC) flag, Daiki Ueno, 2020/05/28