summaryrefslogtreecommitdiffstats
path: root/tdeio/tdeio/slaveinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdeio/tdeio/slaveinterface.cpp')
-rw-r--r--tdeio/tdeio/slaveinterface.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/tdeio/tdeio/slaveinterface.cpp b/tdeio/tdeio/slaveinterface.cpp
index 6de70b57f..47f935cda 100644
--- a/tdeio/tdeio/slaveinterface.cpp
+++ b/tdeio/tdeio/slaveinterface.cpp
@@ -533,11 +533,15 @@ void SlaveInterface::sigpipe_handler(int)
{
int saved_errno = errno;
// Using kdDebug from a signal handler is not a good idea.
-#ifndef NDEBUG
+#ifndef NDEBUG
char msg[1000];
sprintf(msg, "*** SIGPIPE *** (ignored, pid = %ld)\n", (long) getpid());
- write(2, msg, strlen(msg));
-#endif
+ if (write(2, msg, strlen(msg)) < 0) {
+ // FIXME
+ // Could not write error message
+ // Triple fault? ;-)
+ }
+#endif
// Do nothing.
// dispatch will return false and that will trigger ERR_SLAVE_DIED in slave.cpp