Added the cancelation setting to make sure the thread stops immediately.
This commit is contained in:
1 parent
0d66719c5a
commit
eb78e5e1f4
2 files changed
+7
-1
No files matched your search
+4
-1
@@ -1,4 +1,4 @@
|
||||
/* $Id: thread.c,v 1.22 2002-04-08 21:35:10 rjkaes Exp $
|
||||
/* $Id: thread.c,v 1.23 2002-04-09 00:37:43 rjkaes Exp $
|
||||
*
|
||||
* Handles the creation/destruction of the various threads required for
|
||||
* processing incoming connections.
|
||||
@@ -118,6 +118,9 @@ thread_main(void *arg)
|
||||
socklen_t clilen;
|
||||
struct thread_s *ptr;
|
||||
|
||||
/* Set the cancelation type to immediate. */
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
|
||||
ptr = (struct thread_s *) arg;
|
||||
|
||||
cliaddr = safemalloc(addrlen);
|
||||
|
||||
Reference in new issue
Block a user