[systemd-commits] src/main.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon May 17 18:27:08 PDT 2010


 src/main.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 5b2a09037232980ad42ba3611cf194078ae5e546
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue May 18 03:27:02 2010 +0200

    main: if we fail to acquire a terminal for the crash shell, warn but continue

diff --git a/src/main.c b/src/main.c
index bba2975..e2d2ab5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -138,15 +138,10 @@ _noreturn static void crash(int sig) {
                 else if (pid == 0) {
                         int fd, r;
 
-                        if ((fd = acquire_terminal("/dev/console", false, true)) < 0) {
+                        if ((fd = acquire_terminal("/dev/console", false, true)) < 0)
                                 log_error("Failed to acquire terminal: %s", strerror(-fd));
-                                _exit(1);
-                        }
-
-                        if ((r = make_stdio(fd)) < 0) {
+                        else if ((r = make_stdio(fd)) < 0)
                                 log_error("Failed to duplicate terminal fd: %s", strerror(-r));
-                                _exit(1);
-                        }
 
                         execl("/bin/sh", "/bin/sh", NULL);
 


More information about the systemd-commits mailing list