The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Multithread app - Read-Only Data jonas.gabriel High Level Programming 1 05-14-2008 05:39 AM
Multithread,libcurl canerbulut High Level Programming 0 12-23-2006 06:27 PM
About the Timeout lyh003473 SUN Solaris 4 07-24-2004 10:12 PM
timeout csaunders HP-UX 5 02-27-2004 10:54 AM
how to set timeout for aix? ichiro UNIX for Dummies Questions & Answers 3 01-27-2004 06:36 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-26-2002
Nads Nads is offline
Registered User
  
 

Join Date: Apr 2002
Posts: 6
Timeout with multithread server

I wrote a server which creates a thread for every client connection. I have to include timeout function that will kill the server thread if the client doesn't respond for specific time. That too using signal(SIGALRM). For this i am using alarm() function.
When the server thread detects signal it calls the signal handler.
Problem i am facing is that: the signal handler function will be common to all threads. In that case how to do some cleanup functions for perticular server thread? (signal number is the only input to signalhandler)

i hope i explained my problem clearly
if anyone has given a thought on this problem, kindly help me out...
thanks in advance....
  #2 (permalink)  
Old 04-28-2002
manish manish is offline
Registered User
  
 

Join Date: Apr 2002
Posts: 13
Can't you use any other method other than SIGALRM ... like instead of killing the thread, you call the thread to destroy/exit itself?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0