-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
area: filesystemIssue related to filesystemIssue related to filesystemarea: networkingIssue related to networkingIssue related to networkingexportedIssue was exported automaticallyIssue was exported automaticallypriority: p2Normal priorityNormal prioritytype: cleanupRefactorings and cleanups to improve the codeRefactorings and cleanups to improve the codetype: enhancementNew feature or requestNew feature or request
Description
man 2 write:
"EPIPE fd is connected to a pipe or socket whose reading end is closed. When this happens the writing process will also receive a SIGPIPE signal. (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)"
As is typical, the man page oversimplifies things. For sockets there are three different behaviors (that I've found so far):
SOCK_STREAM: returns EPIPE and sends SIGPIPE
SOCK_SEQPACKET: returns EPIPE and does not send SIGPIPE
SOCK_DGRAM: return ECONNREFUSED and does not send SIGPIPE
Metadata
Metadata
Assignees
Labels
area: filesystemIssue related to filesystemIssue related to filesystemarea: networkingIssue related to networkingIssue related to networkingexportedIssue was exported automaticallyIssue was exported automaticallypriority: p2Normal priorityNormal prioritytype: cleanupRefactorings and cleanups to improve the codeRefactorings and cleanups to improve the codetype: enhancementNew feature or requestNew feature or request