SIGINT is like control-C. I think you want to attach SIGTERM to your quit function.
- Steve Eric H. Johnson wrote: >Hi all, > >I think I must be missing something simple, but I don't see it. My LCD >interface program emclcd >(http://cvs.linuxcnc.org/cvs/emc2/src/emc/usr_intf/emclcd.cc?rev=1.5;content >-type=text%2Fplain) isn't responding to the terminal interrupt when EMC >shuts down. This part was copied right out of emcsh. emclcd is loaded with: >loadusr emclcd > >In the source, the next to last line of main sets the signal and function to >call with: > >signal(SIGINT, sigQuit); > >sigQuit is then defined as: > >static void sigQuit(int sig) >{ > sockClose(sockfd); > thisQuit(); >} > >The socket to lcdproc is closed and thisQuit is called. thisQuit just does a >bunch of clean up, however sigQuit is never getting called, thus emclcd >continues to run after EMC has shut down. > >Does anything obvious stick out to anyone as to why this is never getting >called? > >Thanks, >Eric > > > >------------------------------------------------------------------------- >This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >Build the coolest Linux based applications with Moblin SDK & win great prizes >Grand prize is a trip for two to an Open Source event anywhere in the world >http://moblin-contest.org/redirect.php?banner_id=100&url=/ >_______________________________________________ >Emc-developers mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/emc-developers > > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
