o increse stack size for threads calling call backs

o use shutdown() to knock threads out of recv(), but will this work on Solaris ?
The above change reacts to bugs in XTNextEvent() when an fd that has been
closed is registerd with XtAppAddInput
This commit is contained in:
Jeff Hill
2001-08-08 23:51:33 +00:00
parent ec6806d071
commit 7363d6a125
+15 -7
View File
@@ -461,7 +461,7 @@ tcpiiu::tcpiiu ( cac &cac, double connectionTimeout,
}
epicsThreadId tid = epicsThreadCreate ( "CAC-TCP-recv", priorityOfRecv,
epicsThreadGetStackSize ( epicsThreadStackMedium ),
epicsThreadGetStackSize ( epicsThreadStackBig ),
cacRecvThreadTCP, this);
if ( tid == 0 ) {
this->printf ("CA: unable to create CA client receive thread\n");
@@ -586,14 +586,22 @@ void tcpiiu::forcedShutdown ()
SOCKERRSTR (SOCKERRNO) );
}
status = socket_close ( this->sock );
status = ::shutdown ( this->sock, SD_BOTH );
if ( status ) {
errlogPrintf ("CAC TCP socket close error was %s\n",
SOCKERRSTR (SOCKERRNO) );
}
else {
errlogPrintf ("CAC TCP socket shutdown error was %s\n",
SOCKERRSTR (SOCKERRNO) );
status = socket_close ( this->sock );
if ( status ) {
errlogPrintf ("CAC TCP socket close error was %s\n",
SOCKERRSTR (SOCKERRNO) );
}
else {
this->state = iiu_disconnected;
this->sockCloseCompleted = true;
}
}
else {
this->state = iiu_disconnected;
this->sockCloseCompleted = true;
}
}