Print this page
OS-5370 panic in signalfd (fix mancheck)
OS-5370 panic in signalfd
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
@@ -6,13 +6,13 @@
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source. A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
-.\" Copyright 2015, Joyent, Inc.
+.\" Copyright 2016, Joyent, Inc.
.\"
-.Dd "April 9, 2016"
+.Dd "May 05, 2016"
.Dt SIGNALFD 3C
.Os
.Sh NAME
.Nm signalfd
.Nd create or modify a file descriptor for signal handling
@@ -148,10 +148,24 @@
uint64_t ssi_stime; /* system CPU time consumed (SIGCHLD) */
uint64_t ssi_addr; /* address that generated signal */
uint8_t ssi_pad[48]; /* pad size to 128 bytes */
} signalfd_siginfo_t;
.Ed
+.Sh NOTES
+File descriptor duplication during fork presents a challenge to the
+.Sy signalfd
+facility since signal data and events are dependent on the process from which
+they are queried. Its use with caching event systems such as
+.Xr epoll 5 ,
+.Sy /dev/poll ,
+or
+.Xr port_create 3C
+can result in undefined behavior if signalfd and polling descriptors are used
+together after being shared across a fork. Such restrictions do not apply if
+the child only calls
+.Xr close 2
+on the descriptors.
.Sh RETURN VALUES
Upon successful completion, a file descriptor associated with the instance
is returned. Otherwise, -1 is returned and errno is set to indicate the error.
When
.Va fd
@@ -185,8 +199,10 @@
Unable to allocate state for the file descriptor.
.El
.Sh SEE ALSO
.Xr poll 2 ,
.Xr sigwait 2 ,
+.Xr port_create 3C ,
.Xr sigsetops 3C ,
.Xr sigwaitinfo 3C ,
-.Xr signal.h 3HEAD
+.Xr signal.h 3HEAD ,
+.Xr epoll 5