aboutsummaryrefslogtreecommitdiffstats
path: root/man2/timerfd_create.2
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2008-10-10 14:11:52 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2008-10-11 07:49:39 +0200
commit3df1b973f9a0d183fc30f934f2a1769cf52ff4ff (patch)
treed6b80d232491b16abd1ff9d0fd7e69b9b65ee906 /man2/timerfd_create.2
parentf1d97f6e4d7dec8eb6a3bc8deff6b5fe33abb3a7 (diff)
downloadman-pages-3df1b973f9a0d183fc30f934f2a1769cf52ff4ff.tar.gz
timerfd_create.2: Document timerfd_create() TFD_CLOEXEC and TFD_NONBLOCK
TFD_CLOEXEC and TFD_NONBLOCK are supported since LInux 2.6.27. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man2/timerfd_create.2')
-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.