From f690418ac1f8d605646a3a60090c445030e9bc74 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 25 Dec 2019 21:52:12 -0600 Subject: [PATCH] lin_xs_cli: run event loop after calling main() --- xs/platforms/lin_xs_cli.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xs/platforms/lin_xs_cli.c b/xs/platforms/lin_xs_cli.c index 12fd4a136e..b674a34baf 100644 --- a/xs/platforms/lin_xs_cli.c +++ b/xs/platforms/lin_xs_cli.c @@ -49,7 +49,11 @@ int main(int argc, char* argv[]) // here printf("lin_xs_cli: invoking main(argv)\n"); xsCallFunction1(xsVar(1), xsUndefined, xsVar(0)); - printf(" lin_xs_cli: invoked\n"); + printf(" lin_xs_cli: invoked; entering event loop\n"); + + GMainLoop *loop = g_main_loop_new(g_main_context_default(), FALSE); + g_main_loop_run(loop); // ISSUE: how to exit when quiescent? + g_main_loop_unref(loop); } xsCatch { xsStringValue message = xsToString(xsException);