open(2)


       #include <fcntl.h>

       int open(const char *pathname, int flags);
       int open(const char *pathname, int flags, mode_t mode);

       int creat(const char *pathname, mode_t mode);

       int openat(int dirfd, const char *pathname, int flags);
       int openat(int dirfd, const char *pathname, int flags, mode_t mode);

       /* Documented separately, in openat2(2): */
       int openat2(int dirfd, const char *pathname,
                   const struct open_how *how, size_t size);

Description

flags

자주 μ“°λŠ” ν”Œλž˜κ·Έ: μ—¬λŸ¬ ν”„λ‘œμ„ΈμŠ€λ“€ 간에 독점적인 읽기λ₯Ό 보μž₯ν•΄μ£ΌλŠ” μ˜΅μ…˜. μΌμ’…μ˜ lock 파일처럼 μ“Έ 수 μžˆκ²Œλœλ‹€.

O_CREAT | O_EXCL