From e9b1ab7892fe6b46b21d2d60a01ccbdd5ee04394 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 2 Apr 2014 09:36:45 +0200 Subject: [PATCH] perf_event_open.2: Minor fix: place PERF_FLAG_FD_CLOEXEC in alphabetical order Signed-off-by: Michael Kerrisk --- man2/perf_event_open.2 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2 index 5aa689228..c6fb9e193 100644 --- a/man2/perf_event_open.2 +++ b/man2/perf_event_open.2 @@ -132,6 +132,20 @@ The .I flags argument is formed by ORing together zero or more of the following values: .TP +.BR PERF_FLAG_FD_CLOEXEC " (since Linux 3.14)." +This flag enables the close-on-exec flag for the created +event file descriptor, +so that the file descriptor is automatically closed on +.BR execve (2). +Setting the close-on-exec flags at creation time rather than later with +.BR fcntl (2) +avoids potential race conditions where the calling thread invokes +.BR perf_event_open () +at the same time as another thread calls +.BR fork (2) +then +.BR execve (2). +.TP .BR PERF_FLAG_FD_NO_GROUP .\" FIXME The following sentence is unclear This flag allows creating an event as part of an event group but @@ -164,20 +178,6 @@ must be passed as the parameter. cgroup monitoring is available only for system-wide events and may therefore require extra permissions. -.TP -.BR PERF_FLAG_FD_CLOEXEC " (since Linux 3.14)." -This flag enables the close-on-exec flag for the created -event file descriptor, -so that the file descriptor is automatically closed on -.BR execve (2). -Setting the close-on-exec flags at creation time rather than later with -.BR fcntl (2) -avoids potential race conditions where the calling thread invokes -.BR perf_event_open () -at the same time as another thread calls -.BR fork (2) -then -.BR execve (2). .P The .I perf_event_attr