[comp.lang.c++] UNIX "signal

wagner@tlab2.cs.unc.edu (Michael Wagner) (03/17/91)

I'm a neophyte C++ programmer, and I'm trying to figure out
how to set up a signal handler in UNIX (SunOS, not sure which
version).  What I'd like to do is something like:

void Texted::Update() {

   filemessage = new Message(filename);
   signal(SIGUSR1,this->Update());
}

Texted::Texted () {

   signal(SIGUSR1,this->Update());
   filemessage = new Message(filename);
   .
   .
   .
}

I know that this doesn't work, because I'm not sending
signal a pointer to a function as the second argument.
There's a strange workaround in the signal.h file, and
I don't understand it a bit.  I am using the AT&T CC compiler
if that helps.

Has anyone out there faced/solved this problem?

Mike Wagner