Open file read o_rdonly


















The open file description is new, and therefore the file descriptor shall not share it with any other process in the system. The file offset used to mark the current position within the file shall be set to the beginning of the file. The file status flags and file access modes of the open file description shall be set according to the value of oflag. Applications shall specify exactly one of the first three values file access modes below in the value of oflag :.

An open for writing-only shall return an error if no process currently has the file open for reading. An open for writing-only shall block the calling thread until a thread opens the file for reading.

Subsequent behavior of the device is device-specific. Conforming applications shall call unlockpt before opening the slave side. Upon successful completion, the function shall open the file and return a non-negative integer representing the lowest numbered unused file descriptor. Otherwise, -1 shall be returned and errno set to indicate the error. No files shall be created or modified if the function returns Close Privacy Overview This website uses cookies to improve your experience while you navigate through the website.

Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.

Check out our Data Structures in C course to start learning today. Previous dup and dup2 Linux system call. Next Mutex vs Semaphore. Recommended Articles. Write a C program that displays contents of a given file like 'more' utility in Linux.

Write a C program to print "GfG" repeatedly without using loop, recursion and any control structure? Article Contributed By :. Easy Normal Medium Hard Expert. Writing code in comment? Please use ide. Load Comments. What's New. Most popular in C Language. More related articles in C Language.



0コメント

  • 1000 / 1000