Module Name:    src
Committed By:   riastradh
Date:           Mon Nov 30 00:21:36 UTC 2020

Modified Files:
        src/lib/libc/sys: open.2

Log Message:
Note that open(O_ASYNC) does not work as advertised.

This matches Linux, which also advertises the same semantics and
fails to implement it, according to:

https://man7.org/linux/man-pages/man2/fcntl.2.html

(At what point should we collectively stop advertising the semantics
that doesn't work and call the bug a feature?)


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/lib/libc/sys/open.2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/sys/open.2
diff -u src/lib/libc/sys/open.2:1.62 src/lib/libc/sys/open.2:1.63
--- src/lib/libc/sys/open.2:1.62	Mon Sep 16 04:59:32 2019
+++ src/lib/libc/sys/open.2	Mon Nov 30 00:21:35 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: open.2,v 1.62 2019/09/16 04:59:32 wiz Exp $
+.\"	$NetBSD: open.2,v 1.63 2020/11/30 00:21:35 riastradh Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -217,6 +217,13 @@ Enable the
 signal to be sent to the process group
 when I/O is possible, e.g.,
 upon availability of data to be read.
+.Pp
+Note: This is broken in
+.Fn open ;
+it must be set explicitly with the
+.Dv F_SETFL
+command to
+.Xr fcntl 2 .
 .\"    (This block awaits a decision about the semantics of O_SEARCH)
 .\" .It Dv O_SEARCH
 .\" If opening a directory, search permission checks will not be performed on
@@ -509,3 +516,13 @@ An
 .Fn open
 function call appeared in
 .At v1 .
+.Sh BUGS
+.Dv O_ASYNC
+doesn't actually work as advertised with
+.Nm ;
+you must set
+.Dv O_ASYNC
+explicitly with the
+.Dv F_SETFL
+command to
+.Xr fcntl 2 .

Reply via email to