I am working on a multithreaded application in which, in one of the code paths, multiple threads need to setup a SIGALRM signal (to achieve TCP retrasmission kind of functionality). When each thread does this, it also need to pass the address of the structure that it operated upon, so that when the signal is delivered, the signal handling thread will know the address of the strucutre and can act upon it. Is there any way to accomplish this goal? If you need any other info about the problem environment, I can provide them, please let me know. Thanks, Sreevathsa > -----Original Message----- > From: linux-c-programming-owner@xxxxxxxxxxxxxxx > [mailto:linux-c-programming-owner@xxxxxxxxxxxxxxx] On Behalf > Of Glynn Clements > Sent: Wednesday, March 28, 2007 5:09 PM > To: Sreevathsa > Cc: linux-c-programming@xxxxxxxxxxxxxxx > Subject: Re: Custom defined object in a signal handler > > > Sreevathsa wrote: > > > I have a question regarding signals. Is there a way you can > pass some > > custom defined parameter (say, a struct foo * ) to a signal > handler?? > > No (other than by using a global variable). > > As you can only install a single handler for any given > signal, there isn't any real need to support closures. > > -- > Glynn Clements <glynn@xxxxxxxxxxxxxxxxxx> > - > To unsubscribe from this list: send the line "unsubscribe > linux-c-programming" in the body of a message to > majordomo@xxxxxxxxxxxxxxx More majordomo info at > http://vger.kernel.org/majordomo-info.html - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html