diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2017-01-27 10:47:17 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2017-01-27 10:47:17 +1300 |
commit | efe8c45a10406d5f8255834ff84153be168cd8bb (patch) | |
tree | 2e84d138cb4792e484d568a89131145cee498063 /tests/src | |
parent | e3f0752d51490c01bd24b6ae43126a1d14da54a4 (diff) | |
download | lightdm-git-efe8c45a10406d5f8255834ff84153be168cd8bb.tar.gz |
Correctly pass return value from sessions to LightDM
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/test-gobject-greeter.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/src/test-gobject-greeter.c b/tests/src/test-gobject-greeter.c index 94ebf519..92486d4c 100644 --- a/tests/src/test-gobject-greeter.c +++ b/tests/src/test-gobject-greeter.c @@ -520,7 +520,7 @@ main (int argc, char **argv) g_key_file_load_from_file (config, path, G_KEY_FILE_NONE, NULL); g_free (path); - if (g_key_file_has_key (config, "test-greeter-config", "return-value", NULL)) + if (g_key_file_get_boolean (config, "test-greeter-config", "exit-on-startup", NULL)) { int return_value = g_key_file_get_integer (config, "test-greeter-config", "return-value", NULL); status_notify ("%s EXIT CODE=%d", greeter_id, return_value); @@ -561,5 +561,11 @@ main (int argc, char **argv) g_main_loop_run (loop); + if (g_key_file_has_key (config, "test-greeter-config", "return-value", NULL)) + { + int return_value = g_key_file_get_integer (config, "test-greeter-config", "return-value", NULL); + return return_value; + } + return exit_code; } |