| 138 | } |
| 139 | |
| 140 | static int |
| 141 | soo_write(struct file *fp, struct uio *uio, struct ucred *active_cred, |
| 142 | int flags, struct thread *td) |
| 143 | { |
| 144 | struct socket *so = fp->f_data; |
| 145 | int error; |
| 146 | |
| 147 | #ifdef MAC |
| 148 | error = mac_socket_check_send(active_cred, so); |
| 149 | if (error) |
| 150 | return (error); |
| 151 | #endif |
| 152 | error = sosend(so, 0, uio, 0, 0, 0, uio->uio_td); |
| 153 | if (error == EPIPE && (so->so_options & SO_NOSIGPIPE) == 0) { |
| 154 | PROC_LOCK(uio->uio_td->td_proc); |
| 155 | tdsignal(uio->uio_td, SIGPIPE); |
| 156 | PROC_UNLOCK(uio->uio_td->td_proc); |
| 157 | } |
| 158 | return (error); |
| 159 | } |
| 160 | |
| 161 | static int |
| 162 | soo_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, |
nothing calls this directly
no test coverage detected