This rides previous libc minor bump.
Feedback and OK guenther@
_thread_sys_kevent
_thread_sys_kill
_thread_sys_kqueue
+_thread_sys_kqueue1
_thread_sys_ktrace
_thread_sys_lchown
_thread_sys_link
kevent
kill
kqueue
+kqueue1
ktrace
lchown
link
-/* $OpenBSD: event.h,v 1.1 2023/05/18 16:11:09 guenther Exp $ */
+/* $OpenBSD: event.h,v 1.2 2023/08/20 15:17:53 visa Exp $ */
/*
* Copyright (c) 2023 Philip Guenther <guenther@openbsd.org>
*
PROTO_NORMAL(kevent);
PROTO_NORMAL(kqueue);
+PROTO_NORMAL(kqueue1);
#endif /* !_LIBC_SYS_EVENT_H_ */
-# $OpenBSD: Makefile.inc,v 1.173 2023/02/27 14:59:33 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.174 2023/08/20 15:17:53 visa Exp $
# $NetBSD: Makefile.inc,v 1.35 1995/10/16 23:49:07 jtc Exp $
# @(#)Makefile.inc 8.1 (Berkeley) 6/17/93
getpriority.o getresgid.o getresuid.o \
getrlimit.o getrusage.o getsid.o getsockname.o \
getsockopt.o ioctl.o \
- kevent.o kill.o kqueue.o ktrace.o lchown.o \
+ kevent.o kill.o kqueue.o kqueue1.o ktrace.o lchown.o \
link.o linkat.o listen.o lseek.o lstat.o \
madvise.o mimmutable.o minherit.o mkdir.o mkdirat.o mkfifo.o mkfifoat.o \
mknod.o mknodat.o mlock.o mlockall.o mmap.o mount.o mprotect.o \
-.\" $OpenBSD: kqueue.2,v 1.49 2023/08/13 10:23:26 jmc Exp $
+.\" $OpenBSD: kqueue.2,v 1.50 2023/08/20 15:17:53 visa Exp $
.\"
.\" Copyright (c) 2000 Jonathan Lemon
.\" All rights reserved.
.\"
.\" $FreeBSD: src/lib/libc/sys/kqueue.2,v 1.18 2001/02/14 08:48:35 guido Exp $
.\"
-.Dd $Mdocdate: August 13 2023 $
+.Dd $Mdocdate: August 20 2023 $
.Dt KQUEUE 2
.Os
.Sh NAME
.Nm kqueue ,
+.Nm kqueue1 ,
.Nm kevent ,
.Nm EV_SET
.Nd kernel event notification mechanism
.Ft int
.Fn kevent "int kq" "const struct kevent *changelist" "int nchanges" "struct kevent *eventlist" "int nevents" "const struct timespec *timeout"
.Fn EV_SET "&kev" ident filter flags fflags data udata
+.In sys/types.h
+.In sys/event.h
+.In sys/time.h
+.In fcntl.h
+.Ft int
+.Fn kqueue1 "int flags"
.Sh DESCRIPTION
.Fn kqueue
provides a generic method of notifying the user when an event
.Xr fork 2 .
Similarly, kqueues cannot be passed across UNIX-domain sockets.
.Pp
+The
+.Fn kqueue1
+function is identical to
+.Fn kqueue
+except that the close-on-exec flag on the new file descriptor
+is determined by the
+.Dv O_CLOEXEC flag
+in the
+.Fa flags
+argument.
+.Pp
.Fn kevent
is used to register events with the queue, and return any pending
events to the user.
.El
.Sh RETURN VALUES
.Fn kqueue
-creates a new kernel event queue and returns a file descriptor.
+and
+.Fn kqueue1
+create a new kernel event queue and returns a file descriptor.
If there was an error creating the kernel event queue, a value of -1 is
returned and
.Va errno
.Sh ERRORS
The
.Fn kqueue
-function fails if:
+and
+.Fn kqueue1
+functions fail if:
.Bl -tag -width Er
.It Bq Er ENOMEM
The kernel failed to allocate enough memory for the kernel queue.
The system file table is full.
.El
.Pp
+In addition,
+.Fn kqueue1
+fails if:
+.Bl -tag -width Er
+.It Bq Er EINVAL
+.Fa flags
+is invalid.
+.El
+.Pp
The
.Fn kevent
function fails if:
-.\" $OpenBSD: pledge.2,v 1.66 2023/06/02 17:44:29 cheloha Exp $
+.\" $OpenBSD: pledge.2,v 1.67 2023/08/20 15:17:53 visa Exp $
.\"
.\" Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
.\"
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: June 2 2023 $
+.Dd $Mdocdate: August 20 2023 $
.Dt PLEDGE 2
.Os
.Sh NAME
.Xr issetugid 2 ,
.Xr kevent 2 ,
.Xr kqueue 2 ,
+.Xr kqueue1 2 ,
.Xr lseek 2 ,
.Xr madvise 2 ,
.Xr minherit 2 ,
major=27
-minor=0
+minor=1