Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149107161
D28562.1789536869.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28562.1789536869.diff
View Options
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -566,12 +566,6 @@
if (auio->uio_resid != cnt && (error == ERESTART ||
error == EINTR || error == EWOULDBLOCK))
error = 0;
- /* Socket layer is responsible for issuing SIGPIPE. */
- if (fp->f_type != DTYPE_SOCKET && error == EPIPE) {
- PROC_LOCK(td->td_proc);
- tdsignal(td, SIGPIPE);
- PROC_UNLOCK(td->td_proc);
- }
}
cnt -= auio->uio_resid;
#ifdef KTRACE
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1080,14 +1080,15 @@
(wpipe->pipe_state & PIPE_EOF)) {
pipeunlock(wpipe);
PIPE_UNLOCK(rpipe);
- return (EPIPE);
+ error = EPIPE;
+ goto out;
}
#ifdef MAC
error = mac_pipe_check_write(active_cred, wpipe->pipe_pair);
if (error) {
pipeunlock(wpipe);
PIPE_UNLOCK(rpipe);
- return (error);
+ goto out;
}
#endif
++wpipe->pipe_busy;
@@ -1318,6 +1319,9 @@
PIPE_UNLOCK(rpipe);
if (uio->uio_resid != orig_resid)
td->td_ru.ru_msgsnd++;
+out:
+ if (error == EPIPE)
+ tdsignal(td, SIGPIPE);
return (error);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 16, 5:34 AM (10 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29670570
Default Alt Text
D28562.1789536869.diff (1 KB)
Attached To
Mode
D28562: fix sys_write error, only need SIGPIPE for EPIPE and socket
Attached
Detach File
Event Timeline
Log In to Comment