Programming/C Win32 MFC
fopen exclusivly
구차니
2021. 7. 9. 10:35
NOTES Glibc notes The GNU C library allows the following extensions for the string specified in mode: c (since glibc 2.3.3) Do not make the open operation, or subsequent read and write operations, thread cancellation points. This flag is ignored for fdopen(). e (since glibc 2.7) Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen(). m (since glibc 2.3) Attempt to access the file using mmap(2), rather than I/O system calls (read(2), write(2)). Currently, use of mmap(2) is attempted only for a file opened for reading. x Open the file exclusively (like the O_EXCL flag of open(2)). If the file already exists, fopen() fails, and sets errno to EEXIST. This flag is ignored for fdopen(). |
[링크 : https://stackoverflow.com/questions/33312900/how-to-forbid-multiple-fopen-of-same-file]
[링크 : https://stackoverflow.com/questions/16806998/is-fopen-a-thread-safe-function-in-linux]