MCPcopy Create free account
hub / github.com/F-Stack/f-stack / soo_write

Function soo_write

freebsd/kern/sys_socket.c:140–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140static int
141soo_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
161static int
162soo_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred,

Callers

nothing calls this directly

Calls 3

mac_socket_check_sendFunction · 0.85
sosendFunction · 0.85
tdsignalFunction · 0.70

Tested by

no test coverage detected