2008/8/5 Daniel Baluta <[EMAIL PROTECTED]> > man fcntl > > Daniel. > > On Tue, Aug 5, 2008 at 5:20 PM, Сергей - <[EMAIL PROTECTED]> > wrote: > > Hello dear ALL, > > > > > > How can I change access mode of existing file descriptor. > > I have a file descriptor open for reading, and I need to write to this > file > > descriptor. > > > > Thanks. > > >
Cite from man fcntl: F_SETFL Set the file status flags to the value specified by arg. * File access mode* (O_RDONLY, O_WRONLY, O_RDWR) and file creation flags (i.e., O_CREAT, O_EXCL,O_NOCTTY, O_TRUNC) in arg* are ignored*. On Linux this command can only change the O_APPEND, O_ASYNC, O_DIRECT, O_NOATIME, and O_NONBLOCK flags.
