mirror of https://github.com/mkerrisk/man-pages
fcntl.2: Note an F_SETSIG corner case
Reported-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
9a06730f49
commit
caf997afa0
13
man2/fcntl.2
13
man2/fcntl.2
|
@ -931,6 +931,19 @@ with
|
|||
.B O_NONBLOCK
|
||||
set etc.) to determine which file descriptors are available for I/O.
|
||||
|
||||
Note that the file descriptor provided in
|
||||
.I si_fd
|
||||
is the one that that was specified during the
|
||||
.BR F_SETSIG
|
||||
operation.
|
||||
This can lead to an unusual corner case.
|
||||
If the file descriptor is duplicated
|
||||
.RB ( dup (2)
|
||||
or similar), and the original file descriptor is closed,
|
||||
then I/O events will continue to be generated, but the
|
||||
.I si_fd
|
||||
field will contain the number of the now closed file descriptor.
|
||||
|
||||
By selecting a real time signal (value >=
|
||||
.BR SIGRTMIN ),
|
||||
multiple I/O events may be queued using the same signal numbers.
|
||||
|
|
Loading…
Reference in New Issue