diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2017-09-28 15:33:50 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2017-10-03 16:18:28 -0400 |
commit | 69420ae2c587c75cfb915330d4f60f866281345b (patch) | |
tree | c3db9bef9e74a801c0f42e31d0a1b8ab6b78800c /daemon/test-session-client.c | |
parent | e6f5fa6d95e2661477471c6ff1a6a0c379421785 (diff) | |
download | gdm-69420ae2c587c75cfb915330d4f60f866281345b.tar.gz |
Use standard exit codes.
Use EXIT_ defines for readibility.
There were some exit codes > 1, but they don't seem to be checked by any of the
parent process code. This does mean that the logs might have changed, but
modern logging techniques have probably made this obsolete.
https://bugzilla.gnome.org/show_bug.cgi?id=788307
Diffstat (limited to 'daemon/test-session-client.c')
-rw-r--r-- | daemon/test-session-client.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/daemon/test-session-client.c b/daemon/test-session-client.c index a38cbfda..ae4f59d3 100644 --- a/daemon/test-session-client.c +++ b/daemon/test-session-client.c @@ -125,7 +125,7 @@ on_secret_info_query (GdmDBusUserVerifier *user_verifier, if (tcsetattr (fileno (stdin), TCSAFLUSH, &ts1) != 0) { fprintf (stderr, "Could not set terminal attributes\n"); - exit (1); + exit (EXIT_FAILURE); } answer[0] = '\0'; @@ -164,7 +164,7 @@ main (int argc, system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); if (system_bus == NULL) { g_critical ("Failed connecting to the system bus (this is pretty bad): %s", error->message); - exit (1); + exit (EXIT_FAILURE); } manager = GDM_DBUS_MANAGER (gdm_dbus_manager_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, @@ -175,7 +175,7 @@ main (int argc, &error)); if (manager == NULL) { g_critical ("Failed creating display proxy: %s", error->message); - exit (1); + exit (EXIT_FAILURE); } address = NULL; @@ -186,7 +186,7 @@ main (int argc, &error); if (address == NULL) { g_critical ("Failed opening reauthentication channel: %s", error->message); - exit (1); + exit (EXIT_FAILURE); } connection = g_dbus_connection_new_for_address_sync (address, @@ -196,7 +196,7 @@ main (int argc, &error); if (connection == NULL) { g_critical ("Failed connecting to the manager: %s", error->message); - exit (1); + exit (EXIT_FAILURE); } user_verifier = GDM_DBUS_USER_VERIFIER (gdm_dbus_user_verifier_proxy_new_sync (connection, @@ -207,7 +207,7 @@ main (int argc, &error)); if (user_verifier == NULL) { g_critical ("Failed creating user verifier proxy: %s", error->message); - exit (1); + exit (EXIT_FAILURE); } g_signal_connect (user_verifier, @@ -246,7 +246,7 @@ main (int argc, &error); if (!ok) { g_critical ("Failed to start PAM session: %s", error->message); - exit (1); + exit (EXIT_FAILURE); } |