In my multi-threaded application, the main thread sits in a while loop waiting for something to be received on a socket (the app is a TCP/IP server). I create a new thread whenever I receive data from a socket. My new thread then looks at the content of the data that came off the socket. This data may contain an "exit" request. When I get this request, I simply call exit to terminate the application. While this was happening, back in the main thread, I have looped back around to wait for the next request. So essentially, the main thread is sitting in 'accept' at the same time I'm trying to exit the application. The child thread exits ok, but it does not exit the application, because it cannot interrupt accept. Is this normal behaviour? I thought that calling exit would terminate the app immediately. How can I interrupt the accept call and cause the app to exit? Thanks.