diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-04-09 00:37:43 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2002-04-09 00:37:43 +0000 |
commit | eb78e5e1f4bd32774e6ab03eb07dcd93bd01c00c (patch) | |
tree | 74067c7a8cb701746f54a7c55c9f793f24eb045b /src | |
parent | 0d66719c5afbc66d81ad4304b3c830c48379b0a8 (diff) | |
download | tinyproxy-eb78e5e1f4bd32774e6ab03eb07dcd93bd01c00c.tar.gz tinyproxy-eb78e5e1f4bd32774e6ab03eb07dcd93bd01c00c.zip |
Added the cancelation setting to make sure the thread stops immediately.
Diffstat (limited to 'src')
-rw-r--r-- | src/thread.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/thread.c b/src/thread.c index 534ed8b..40beab8 100644 --- a/src/thread.c +++ b/src/thread.c @@ -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); |