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

Function soo_close

freebsd/kern/sys_socket.c:354–367  ·  view source on GitHub ↗

* API socket close on file pointer. We call soclose() to close the socket * (including initiating closing protocols). soclose() will sorele() the * file reference but the actual socket will not go away until the socket's * ref count hits 0. */

Source from the content-addressed store, hash-verified

352 * ref count hits 0.
353 */
354static int
355soo_close(struct file *fp, struct thread *td)
356{
357 int error = 0;
358 struct socket *so;
359
360 so = fp->f_data;
361 fp->f_ops = &badfileops;
362 fp->f_data = NULL;
363
364 if (so)
365 error = soclose(so);
366 return (error);
367}
368
369#ifndef FSTACK
370static int

Callers

nothing calls this directly

Calls 1

socloseFunction · 0.85

Tested by

no test coverage detected