summaryrefslogtreecommitdiff
path: root/noncore/net/mail/opiemail.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/opiemail.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/opiemail.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp
index 5399c3c..2f87e44 100644
--- a/noncore/net/mail/opiemail.cpp
+++ b/noncore/net/mail/opiemail.cpp
@@ -19,4 +19,7 @@
/* QT */
+/* UNIX */
+#include <signal.h>
+
using namespace Opie::Core;
@@ -24,4 +27,5 @@ OpieMail::OpieMail( QWidget *parent, const char *name, WFlags flags )
: MainWindow( parent, name, WStyle_ContextHelp )
{
+ setup_signalblocking();
settings = new Settings();
@@ -34,4 +38,14 @@ OpieMail::~OpieMail()
}
+void OpieMail::setup_signalblocking()
+{
+ /* for networking we must block SIGPIPE and Co. */
+ struct sigaction blocking_action,temp_action;
+ blocking_action.sa_handler = SIG_IGN;
+ sigemptyset(&(blocking_action.sa_mask));
+ blocking_action.sa_flags = 0;
+ sigaction(SIGPIPE,&blocking_action,&temp_action);
+}
+
void OpieMail::appMessage(const QCString &msg, const QByteArray &data)
{