diff --git a/man2/close_range.2 b/man2/close_range.2 index 5abb73990..f02926bce 100644 --- a/man2/close_range.2 +++ b/man2/close_range.2 @@ -50,11 +50,11 @@ Errors closing a given file descriptor are currently ignored. is a bit mask containing 0 or more of the following: .TP .BR CLOSE_RANGE_CLOEXEC " (since Linux 5.11)" -sets the file descriptor's close-on-exec flag instead of -immediately closing the file descriptors. +Set the close-on-exec flag on the specified file descriptors, +rather than immediately closing them. .TP .B CLOSE_RANGE_UNSHARE -unshares the range of file descriptors from any other processes, +Unshare the specified file descriptors from any other processes before closing them, avoiding races with other threads sharing the file descriptor table. .SH RETURN VALUE @@ -63,7 +63,7 @@ On success, returns 0. On error, \-1 is returned and .I errno -is set to indicate the cause of the error. +is set to indicate the error. .SH ERRORS .TP .B EINVAL @@ -204,13 +204,13 @@ main(int argc, char *argv[]) } for (int i = 2; i < argc; i++) { - if (open(argv[i], O_RDONLY) == -1) { + if (open(argv[i], O_RDONLY) == \-1) { perror(argv[i]); exit(EXIT_FAILURE); } } - if (syscall(__NR_close_range, 3, ~0U, 0) == -1) { + if (syscall(__NR_close_range, 3, ~0U, 0) == \-1) { perror("close_range"); exit(EXIT_FAILURE); }