1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

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

This commit is contained in:
Lennart Poettering 2010-05-18 03:27:02 +02:00
parent 670802d4b1
commit 5b2a090372

View File

@ -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);