Package: manpages-dev
Version: 2.22-1

fcntl(2) describes that the third argument "arg" is long for F_SETFL.

% man fcntl 
...
       int fcntl(int fd, int cmd, long arg);
...
       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
              (e.g.,O_CREAT,  O_EXCL,  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.
...

But POSIX (IEEE Std 1003.1-2001) defines it int.

...
    F_SETFL
        Set the file status flags, defined in <fcntl.h>, for the file
        description associated with fildes from the corresponding bits in the
        third argument, arg, taken as type int. Bits corresponding to the file
        access mode and the file creation flags, as defined in <fcntl.h>, that
        are set in arg shall be ignored. If any bits in arg other than those
        mentioned here are changed by the application, the result is
        unspecified.
...

I'm not sure that it is just a document problem or it
reflects a problem of glibc/linux.
-- 
Tanaka Akira


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to