catching signals
catching signals
- Subject: catching signals
- From: Robert Goldsmith <email@hidden>
- Date: Tue, 20 Apr 2004 20:09:57 +0100
Hi :)
I'm trying to catch the sigint that (I hope) is generated by the serial
port when it receives a Break sequence. Using Apple's bsd info, I have
used the following:
/******** Catch the sig *************/
static void catch_sigint(int signo)
{
NSLog(@"Caught %i, exiting...",signo);
exit(1);
}
then, in the serial connect method:
//setup sigint
struct sigaction sa_old;
struct sigaction sa_new;
sa_new.sa_handler = catch_sigint;
sigemptyset(&sa_new.sa_mask);
sa_new.sa_flags = 0;
sigaction(SIGINT, &sa_new, &sa_old );
However, I don't seem to be receiving the signals (the function is not
called). Anyone have any ideas?
Thanks
Robert
---
GnuPG public key:
http://www.Far-Blue.co.uk/
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.