I found this in a customer's code, where the intention is to provide a unified method of handling interrupts for an interactive data-entry program:
signal(SIGINT, main);
main doesn't process any command-line parameters, so it's not going to access a bogus argv. This has been in production use for years, so objections like "but... but.... you can't do that!" which I share are obviated in the face of experience.
Posted by Steve at January 31, 2003 08:14 AM | TrackBack