diff options
-rw-r--r-- | src/ingen/main.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ingen/main.cpp b/src/ingen/main.cpp index abf8aa51..847a08f5 100644 --- a/src/ingen/main.cpp +++ b/src/ingen/main.cpp @@ -180,6 +180,10 @@ main(int argc, char** argv) world, engine_interface.get(), path, parent, symbol); } + // Set up signal handlers that will set quit_flag on interrupt + signal(SIGINT, ingen_interrupt); + signal(SIGTERM, ingen_interrupt); + if (conf.option("gui").get_bool()) { world->run_module("gui"); } else if (conf.option("run").is_valid()) { @@ -194,12 +198,6 @@ main(int argc, char** argv) #endif } else if (world->engine() && !conf.option("gui").get_bool()) { - // Run main loop - - // Set up signal handlers that will set quit_flag on interrupt - signal(SIGINT, ingen_interrupt); - signal(SIGTERM, ingen_interrupt); - // Run engine main loop until interrupt while (world->engine()->main_iteration()) { Glib::usleep(125000); // 1/8 second |