>This is because your original server is never dying. There is no >break > from the while(1) loop. > >The join statement at the end is extraneous. what i want to do :- 1. server program listens to port no. 18000 forever. 2. if any request comes create a thread to process the request. 3. on finishing with the request close the thread. what exactly happens :- when i start the server ps shows me one thread running for server thats ok. now say 10 clients send requests so now ps shows me 11 threads running thats fine. but after processing all the requests ps shows me 2 threads running. this means one thread is not getting closed. what is the problem? mehul. ___________________________________________________ Get email that means BUSINESS! me @ mycompany.com. Just Rs.1499/year. To start, click http://www.rediffmailpro.com