aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man2/timerfd_create.238
1 files changed, 31 insertions, 7 deletions
diff --git a/man2/timerfd_create.2 b/man2/timerfd_create.2
index 9046c98b50..67af33141d 100644
--- a/man2/timerfd_create.2
+++ b/man2/timerfd_create.2
@@ -75,12 +75,32 @@ by discontinuous changes in the system clock
The current value of each of these clocks can be retrieved using
.BR clock_gettime (3).
-The
+Starting with Linux 2.6.27, the following values may be bitwise ORed in
+.IR flags
+to change the behavior of
+.BR timerfd_create ():
+.TP 14
+.B TFD_NONBLOCK
+Set the
+.BR O_NONBLOCK
+file status flag on the new file descriptor.
+Using this flag saves extra calls to
+.BR fcntl ()
+to achieve the same result.
+.TP
+.B TFD_CLOEXEC
+Set the close-on-exec
+.RB ( FD_CLOEXEC )
+flag on the new file descriptor.
+See the description of the
+.B O_CLOEXEC
+flag in
+.BR open (2)
+for reasons why this may be useful.
+.PP
+In Linux versions up to and including 2.6.26,
.I flags
-argument is reserved for future use.
-.\" Eventually it will probably allow O_CLOEXEC and maybe O_NONBLOCK.
-As at Linux 2.6.25, this argument must be specified as zero.
-.\"
+must be specified as zero.
.SS timerfd_settime()
.BR timerfd_settime ()
arms (starts) or disarms (stops)
@@ -284,9 +304,13 @@ argument is neither
.B CLOCK_MONOTONIC
nor
.BR CLOCK_REALTIME ;
-or
+.TP
+.B EINVAL
+.I flags
+is invalid;
+or, in Linux 2.6.26 or earlier,
.I flags
-is invalid.
+is non-zero.
.TP
.B EMFILE
The per-process limit of open file descriptors has been reached.