forked from qt-creator/qt-creator
		
	zeroconf: ensure that a broken pipe does not crash creator
Change-Id: Ib8e408d3d7323728333ac8615240684e7f86867f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@nokia.com>
This commit is contained in:
		@@ -45,6 +45,7 @@
 | 
			
		||||
#include <algorithm>
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <limits>
 | 
			
		||||
#include <signal.h>
 | 
			
		||||
 | 
			
		||||
#include <QAtomicPointer>
 | 
			
		||||
#include <QCoreApplication>
 | 
			
		||||
@@ -701,6 +702,14 @@ extern "C" void DNSSD_API cBrowseReply(DNSServiceRef       sdRef,
 | 
			
		||||
 | 
			
		||||
void ConnectionThread::run()
 | 
			
		||||
{
 | 
			
		||||
#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN)
 | 
			
		||||
    struct sigaction act;
 | 
			
		||||
    // ignore SIGPIPE
 | 
			
		||||
    act.sa_handler=SIG_IGN;
 | 
			
		||||
    sigemptyset(&act.sa_mask);
 | 
			
		||||
    act.sa_flags=0;
 | 
			
		||||
    sigaction(SIGPIPE, &act, NULL);
 | 
			
		||||
#endif
 | 
			
		||||
    connection.handleEvents();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user