summaryrefslogtreecommitdiff
path: root/src/thread.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2002-04-22Renamed the LOCKing macros and added assert debugging code. Also, movedRobert James Kaes1-23/+40
the mutex initialization into a function call so that I can use an error checking mutex once I figure out how to get it to work on my computer.
2002-04-18Moved the log rotation code out of the signal handler and into it's ownRobert James Kaes1-1/+7
function. The signal handler now simply sets a flag which is monitored inside the thread_main_loop() function. The log rotation code has also been tightened to handle any error conditions better. Credit to Petr Lampa for suggesting that system functions inside of a signal handler is bad magic.
2002-04-17Removed the close(connfd) call since the socket has already been closedRobert James Kaes1-9/+32
from within the handle_connection() function. Added tests to make sure pthread_create() succeeds. Added defined tests for pthread_cancel() since it's not available on all platforms.
2002-04-09Added the cancelation setting to make sure the thread stops immediately.Robert James Kaes1-1/+4
2002-04-08Just moved the looping code from main() into thread_main_loop().Robert James Kaes1-16/+25
2002-01-25Added code to check for "errors" from the accept call in thread_main() andRobert James Kaes1-1/+23
also a new thread_kill_threads() function which should cancel all threads when the main thread is being closed.
2002-01-08Added code which checks to see if the user has signalled that tinyproxyRobert James Kaes1-8/+13
should be closed.
2001-12-28Check for errors returned by the accept() function.Robert James Kaes1-1/+10
2001-11-22Reformated text.Robert James Kaes1-20/+39
2001-10-24Error message cleanup to make the information more informative.Robert James Kaes1-4/+4
2001-09-15Removed the memory allocation log messages.Robert James Kaes1-4/+2
2001-09-11Set the stack size of threads to 32KB from 128KB.Robert James Kaes1-2/+2
2001-09-08Changed all the mallocs and callocs to use the new safemalloc andRobert James Kaes1-3/+4
safecalloc.
2001-09-08Fixed a memory leak in thread_main().Robert James Kaes1-3/+17
2001-09-07Explictly added the DETACHED creation method on threads.Robert James Kaes1-2/+5
2001-09-07Error message cleanup.Robert James Kaes1-19/+29
Include locking around access to the servers_waiting variable.
2001-09-06Try moving the kill thread code into the thread_main() function so it canRobert James Kaes1-19/+13
check if there are too many thread after it's finished with it's request. Needs to be cleaned up further (if this is the right idea) because of the locking around the servers_waiting variable.
2001-09-06Initialzed the servers_waiting explictly. Added debugging code to find outRobert James Kaes1-3/+8
why the threads are not being closed.
2001-08-28Changed the default stack size to 128 KB.Robert James Kaes1-2/+8
2001-08-27Changed the default stack size since some OS's have a stack size which isRobert James Kaes1-3/+13
too small.
2001-08-26Fixed a problem where child threads would not be closed if they had beenRobert James Kaes1-7/+8
created after the initial creation. Also fixed a problem where the status of the threads were not going back to T_WAITING if MaxRequestsPerChild was 0.
2001-05-27Changed the thread_main() function to only deal with the connections perRobert James Kaes1-18/+20
thread if the user has actually requested it. Also changed some of the data types for the variables.
2001-05-23Fixed a potential problem with not zeroing the number of connections whenRobert James Kaes1-2/+12
the threads are emptied.
2000-12-09Implimented the MaxRequestsPerChild directive.Robert James Kaes1-15/+34
2000-12-08Fixed a problem with polling for the number of active threads. No longerRobert James Kaes1-41/+23
polls. :)
2000-09-12tinyproxy now uses a pool of threads to handle connections. All the workRobert James Kaes1-0/+214
for creating new threads, deleting old thread, and generally managing the pool is done here.