diff options
author | dg <dg@FreeBSD.org> | 2003-12-01 22:12:50 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 2003-12-01 22:12:50 +0000 |
commit | da88330aaaf865884c9af2df08f70b7faf8c5b90 (patch) | |
tree | d64794d6f8ef338b44409cd97dcecd8abdf8c9f4 /sys/kern/uipc_syscalls.c | |
parent | 405a061dd5a9f59c37ad57e4866292004dfd96fb (diff) | |
download | FreeBSD-src-da88330aaaf865884c9af2df08f70b7faf8c5b90.zip FreeBSD-src-da88330aaaf865884c9af2df08f70b7faf8c5b90.tar.gz |
Fixed a bug in sendfile(2) where the sent data would be corrupted due
to sendfile(2) being erroneously automatically restarted after a signal
is delivered. Fixed by converting ERESTART to EINTR prior to exiting.
Updated manual page to indicate the potential EINTR error, its cause
and consequences.
Approved by: re@freebsd.org
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 0e52d4b..135ae1d 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1994,6 +1994,11 @@ done: vrele(vp); if (so) fputsock(so); + mtx_unlock(&Giant); + + if (error == ERESTART) + error = EINTR; + return (error); } |