Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/uipc_syscalls.c
Show First 20 Lines • Show All 779 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
#ifdef KTRACE | #ifdef KTRACE | ||||
if (KTRPOINT(td, KTR_GENIO)) | if (KTRPOINT(td, KTR_GENIO)) | ||||
ktruio = cloneuio(&auio); | ktruio = cloneuio(&auio); | ||||
#endif | #endif | ||||
len = auio.uio_resid; | len = auio.uio_resid; | ||||
error = sosend(so, mp->msg_name, &auio, 0, control, flags, td); | error = sosend(so, mp->msg_name, &auio, 0, control, flags, td); | ||||
if (error != 0) { | if (error != 0) { | ||||
if (auio.uio_resid != len && (error == ERESTART || | if (auio.uio_resid != len && | ||||
error == EINTR || error == EWOULDBLOCK)) | (so->so_proto->pr_flags & PR_ATOMIC) == 0 && | ||||
(error == ERESTART || error == EINTR || | |||||
error == EWOULDBLOCK)) | |||||
error = 0; | error = 0; | ||||
/* Generation of SIGPIPE can be controlled per socket */ | /* Generation of SIGPIPE can be controlled per socket */ | ||||
if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && | if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && | ||||
!(flags & MSG_NOSIGNAL)) { | !(flags & MSG_NOSIGNAL)) { | ||||
PROC_LOCK(td->td_proc); | PROC_LOCK(td->td_proc); | ||||
tdsignal(td, SIGPIPE); | tdsignal(td, SIGPIPE); | ||||
PROC_UNLOCK(td->td_proc); | PROC_UNLOCK(td->td_proc); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 822 Lines • Show Last 20 Lines |