]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/fcntl.2
locale.1, localedef.1, _exit.2, accept.2, access.2, acct.2, adjtimex.2, bdflush.2...
[thirdparty/man-pages.git] / man2 / fcntl.2
index 3c6fcf56bcbbbab762a8581ae2c6ea315100125b..675ded768621d423028037a0108cd070dbcb1121 100644 (file)
@@ -62,7 +62,7 @@
 .\" 2014-07-08, David Herrmann <dh.herrmann@gmail.com>
 .\"     Document F_ADD_SEALS and F_GET_SEALS
 .\"
-.TH FCNTL 2 2015-12-28 "Linux" "Linux Programmer's Manual"
+.TH FCNTL 2 2016-03-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 fcntl \- manipulate file descriptor
 .SH SYNOPSIS
@@ -681,9 +681,9 @@ Set the process ID or process group ID that will receive
 .B SIGIO
 and
 .B SIGURG
-signals for events on file descriptor
-.IR fd
-to the ID given in
+signals for events on the file descriptor
+.IR fd .
+The target process or process group ID is specified in
 .IR arg .
 A process ID is specified as a positive value;
 a process group ID is specified as a negative value.
@@ -693,22 +693,23 @@ Most commonly, the calling process specifies itself as the owner
 is specified as
 .BR getpid (2)).
 
-.\" From glibc.info:
-If you set the
-.B O_ASYNC
-status flag on a file descriptor by using the
+As well as setting the file descriptor owner,
+one must also enable generation of signals on the file descriptor.
+This is done by using the
+.BR fcntl ()
 .B F_SETFL
-command of
-.BR fcntl (),
-a
+command to set the
+.B O_ASYNC
+file status flag on the file descriptor.
+Subsequently, a
 .B SIGIO
 signal is sent whenever input or output becomes possible
-on that file descriptor.
+on the file descriptor.
+The
+.BR fcntl ()
 .B F_SETSIG
-can be used to obtain delivery of a signal other than
+command can be used to obtain delivery of a signal other than
 .BR SIGIO .
-If this permission check fails, then the signal is
-silently discarded.
 
 Sending a signal to the owner process (group) specified by
 .B F_SETOWN
@@ -717,6 +718,8 @@ is subject to the same permissions checks as are described for
 where the sending process is the one that employs
 .B F_SETOWN
 (but see BUGS below).
+If this permission check fails, then the signal is
+silently discarded.
 
 If the file descriptor
 .I fd
@@ -1677,8 +1680,8 @@ and
 .B F_SETOWN
 are specified in POSIX.1-2001.
 (To get their definitions, define either
-.BR _BSD_SOURCE ,
-or
+.\" .BR _BSD_SOURCE ,
+.\" or
 .BR _XOPEN_SOURCE
 with the value 500 or greater, or
 .BR _POSIX_C_SOURCE
@@ -1941,7 +1944,8 @@ It is therefore inadvisable to rely on mandatory locking.
 .BR socket (2),
 .BR lockf (3),
 .BR capabilities (7),
-.BR feature_test_macros (7)
+.BR feature_test_macros (7),
+.BR lslocks (8)
 
 .IR locks.txt ,
 .IR mandatory-locking.txt ,