Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!emory!gatech!mcnc!borg!tlab2!wagner From: wagner@tlab2.cs.unc.edu (Michael Wagner) Newsgroups: comp.lang.c++ Subject: UNIX "signal(SIGINT,func)" in C++ Message-ID: <2339@borg.cs.unc.edu> Date: 16 Mar 91 17:46:48 GMT Sender: news@cs.unc.edu Organization: University of North Carolina, Chapel Hill Lines: 28 Originator: wagner@tlab2 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