File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -485,12 +485,6 @@ void signal_handler(int sig) { running = false; }
485485
486486int main (int argc, char ** argv)
487487{
488- signal (SIGHUP, signal_handler);
489- signal (SIGKILL, signal_handler);
490- signal (SIGTERM, signal_handler);
491- signal (SIGQUIT, signal_handler);
492- signal (SIGABRT, signal_handler);
493-
494488 char identifier;
495489 cag_option_context cag_context;
496490 const char * config_file = NULL ;
@@ -932,6 +926,13 @@ int main(int argc, char** argv)
932926
933927 if (PinmameRun (opt_rom) == PINMAME_STATUS_OK)
934928 {
929+ // Setup signal handlers to allow graceful termination
930+ signal (SIGHUP, signal_handler);
931+ signal (SIGKILL, signal_handler);
932+ signal (SIGTERM, signal_handler);
933+ signal (SIGQUIT, signal_handler);
934+ signal (SIGABRT, signal_handler);
935+
935936 int index_recv = 0 ;
936937
937938 ppuc->StartUpdates ();
You can’t perform that action at this time.
0 commit comments