67 typedef struct signalfd_siginfo {
68 uint32_t ssi_signo; /* signal from signal.h */
69 int32_t ssi_errno; /* error from errno.h */
70 int32_t ssi_code; /* signal code */
71 uint32_t ssi_pid; /* PID of sender */
72 uint32_t ssi_uid; /* real UID of sender */
73 int32_t ssi_fd; /* file descriptor (SIGIO) */
74 uint32_t ssi_tid; /* unused */
75 uint32_t ssi_band; /* band event (SIGIO) */
76 uint32_t ssi_overrun; /* unused */
77 uint32_t ssi_trapno; /* trap number that caused signal */
78 int32_t ssi_status; /* exit status or signal (SIGCHLD) */
79 int32_t ssi_int; /* unused */
80 uint64_t ssi_ptr; /* unused */
81 uint64_t ssi_utime; /* user CPU time consumed (SIGCHLD) */
82 uint64_t ssi_stime; /* system CPU time consumed (SIGCHLD) */
83 uint64_t ssi_addr; /* address that generated signal */
84 uint8_t ssi_pad[48]; /* pad size to 128 bytes */
85 } signalfd_siginfo_t;
86
87 RETURN VALUES
88 Upon successful completion, a file descriptor associated with the
89 instance is returned. Otherwise, -1 is returned and errno is set to
90 indicate the error. When fd is not -1 and there is no error, the value
91 of fd is returned.
92
93 ERRORS
94 The signalfd(function) will fail if:
95
96 EBADF The fd descriptor is invalid.
97
98 EFAULT The mask address is invalid.
99
100 EINVAL The fd descriptor is not a signalfd descriptor or the
101 flags are invalid.
102
103 EMFILE There are currently OPEN_MAX file descriptors open in
104 the calling process.
105
106 ENODEV Unable to allocate state for the file descriptor.
107
108 SEE ALSO
109 poll(2), sigwait(2), sigsetops(3C), sigwaitinfo(3C), signal.h(3HEAD)
110
111 illumos April 9, 2016 illumos
|
67 typedef struct signalfd_siginfo {
68 uint32_t ssi_signo; /* signal from signal.h */
69 int32_t ssi_errno; /* error from errno.h */
70 int32_t ssi_code; /* signal code */
71 uint32_t ssi_pid; /* PID of sender */
72 uint32_t ssi_uid; /* real UID of sender */
73 int32_t ssi_fd; /* file descriptor (SIGIO) */
74 uint32_t ssi_tid; /* unused */
75 uint32_t ssi_band; /* band event (SIGIO) */
76 uint32_t ssi_overrun; /* unused */
77 uint32_t ssi_trapno; /* trap number that caused signal */
78 int32_t ssi_status; /* exit status or signal (SIGCHLD) */
79 int32_t ssi_int; /* unused */
80 uint64_t ssi_ptr; /* unused */
81 uint64_t ssi_utime; /* user CPU time consumed (SIGCHLD) */
82 uint64_t ssi_stime; /* system CPU time consumed (SIGCHLD) */
83 uint64_t ssi_addr; /* address that generated signal */
84 uint8_t ssi_pad[48]; /* pad size to 128 bytes */
85 } signalfd_siginfo_t;
86
87 NOTES
88 File descriptor duplication during fork presents a challenge to the
89 signalfd facility since signal data and events are dependent on the
90 process from which they are queried. Its use with caching event systems
91 such as epoll(5), /dev/poll, or port_create(3C) can result in undefined
92 behavior if signalfd and polling descriptors are used together after
93 being shared across a fork. Such restrictions do not apply if the child
94 only calls close(2) on the descriptors.
95
96 RETURN VALUES
97 Upon successful completion, a file descriptor associated with the
98 instance is returned. Otherwise, -1 is returned and errno is set to
99 indicate the error. When fd is not -1 and there is no error, the value
100 of fd is returned.
101
102 ERRORS
103 The signalfd(function) will fail if:
104
105 EBADF The fd descriptor is invalid.
106
107 EFAULT The mask address is invalid.
108
109 EINVAL The fd descriptor is not a signalfd descriptor or the
110 flags are invalid.
111
112 EMFILE There are currently OPEN_MAX file descriptors open in
113 the calling process.
114
115 ENODEV Unable to allocate state for the file descriptor.
116
117 SEE ALSO
118 poll(2), sigwait(2), port_create(3C), sigsetops(3C), sigwaitinfo(3C),
119 signal.h(3HEAD), epoll(5)
120
121 illumos May 5, 2016 illumos
|