Is it possible to get EPIPE from write() to a file descriptor on an NFS disk?
سؤال
My C++ application seems to have gotten an EPIPE
errno result after a failing call to write()
. The file descriptor passed to write()
is for a file on an NFS mounted disk.
The man page for write()
describes EPIPE
with:
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.)
So I am confused as to how I would get EPIPE
. Could it be that this is a multi-threading issue and the errno is incorrectly being supplied for a different thread? I thought errno is thread safe, so that seems unlikely, but then getting EPIPE seems to make no sense. This is on Centos v4.
لا يوجد حل صحيح
لا تنتمي إلى StackOverflow