Moved signal(SIGPIPE, SIG_IGN) to main.
This commit is contained in:
parent
a40aa6fb8d
commit
fcc0da554b
|
@ -406,6 +406,12 @@ int main(int argc, char *argv[]) {
|
||||||
qtsparkle::LoadTranslations(language);
|
qtsparkle::LoadTranslations(language);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef Q_OS_WIN32
|
||||||
|
// This is needed to prevent SIGPIPE Errors, which occur under some
|
||||||
|
// circumstances in RemoteClient. They cause a program termination.
|
||||||
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
IconLoader::Init();
|
IconLoader::Init();
|
||||||
|
|
||||||
|
|
|
@ -36,12 +36,13 @@ RemoteClient::RemoteClient(Application* app, QTcpSocket* client)
|
||||||
|
|
||||||
// Connect to the slot IncomingData when receiving data
|
// Connect to the slot IncomingData when receiving data
|
||||||
connect(client, SIGNAL(readyRead()), this, SLOT(IncomingData()));
|
connect(client, SIGNAL(readyRead()), this, SLOT(IncomingData()));
|
||||||
|
|
||||||
|
// Connect the signals to see if an error occured or the client
|
||||||
|
// was disconnected.
|
||||||
connect(client, SIGNAL(disconnected()), this, SLOT(Disconnected()));
|
connect(client, SIGNAL(disconnected()), this, SLOT(Disconnected()));
|
||||||
connect(client, SIGNAL(error(QAbstractSocket::SocketError)),
|
connect(client, SIGNAL(error(QAbstractSocket::SocketError)),
|
||||||
this, SLOT(Error(QAbstractSocket::SocketError)));
|
this, SLOT(Error(QAbstractSocket::SocketError)));
|
||||||
|
|
||||||
signal(SIGPIPE, SIG_IGN);
|
|
||||||
|
|
||||||
// Check if we use auth code
|
// Check if we use auth code
|
||||||
QSettings s;
|
QSettings s;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue