Another attempt at stopping SIGPIPEs killing our agents.
This commit is contained in:
+1
-1
@@ -174,7 +174,7 @@ typedef struct {
|
||||
#define CONN_TCP_WRITE(c, b, l, r) \
|
||||
{ \
|
||||
do { \
|
||||
(r) = IPsend((c)->socket, b, l, 0); \
|
||||
(r) = IPsend((c)->socket, b, l, MSG_NOSIGNAL); \
|
||||
if ((r) >= 0) { \
|
||||
CONN_TRACE_DATA((c), CONN_TRACE_EVENT_WRITE, (b), (r)); \
|
||||
break; \
|
||||
|
||||
@@ -387,7 +387,6 @@ void XplDelayNanosleep(int msec);
|
||||
typedef void (*XplShutdownFunc)(int Signal);
|
||||
void XplSignalCatcher(XplShutdownFunc ShutdownFunction);
|
||||
void XplSignalBlock(void);
|
||||
void XplSignalIgnorePipe(void);
|
||||
#define XplSignalHandler(handler) XplSignalCatcher((handler));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -180,9 +180,6 @@ ConnStartup(unsigned long TimeOut, BOOL EnableSSL)
|
||||
seed[sizeof(seed) - 1] = '\0';
|
||||
}
|
||||
|
||||
// Ignore SIGPIPE for now - we don't seem to detect failed
|
||||
// connections correctly. See bug #9726.
|
||||
XplSignalIgnorePipe();
|
||||
XplSignalLocalSemaphore(ConnIO.allocated.sem);
|
||||
|
||||
return(TRUE);
|
||||
|
||||
@@ -89,16 +89,6 @@ void XplSignalBlock(void)
|
||||
return;
|
||||
}
|
||||
|
||||
void XplSignalIgnorePipe(void)
|
||||
{
|
||||
struct sigaction act;
|
||||
|
||||
act.sa_handler = SIG_IGN;
|
||||
sigemptyset (&act.sa_mask);
|
||||
act.sa_flags = 0;
|
||||
sigaction (SIGPIPE, &act, NULL);
|
||||
}
|
||||
|
||||
void XplSignalCatcher(XplShutdownFunc XplShutdownFunction)
|
||||
{
|
||||
sigset_t signalSet;
|
||||
|
||||
Reference in New Issue
Block a user