mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-13 23:45:07 +07:00
main: if we fail to acquire a terminal for the crash shell, warn but continue
This commit is contained in:
parent
670802d4b1
commit
5b2a090372
@ -138,15 +138,10 @@ _noreturn static void crash(int sig) {
|
|||||||
else if (pid == 0) {
|
else if (pid == 0) {
|
||||||
int fd, r;
|
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));
|
log_error("Failed to acquire terminal: %s", strerror(-fd));
|
||||||
_exit(1);
|
else if ((r = make_stdio(fd)) < 0)
|
||||||
}
|
|
||||||
|
|
||||||
if ((r = make_stdio(fd)) < 0) {
|
|
||||||
log_error("Failed to duplicate terminal fd: %s", strerror(-r));
|
log_error("Failed to duplicate terminal fd: %s", strerror(-r));
|
||||||
_exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
execl("/bin/sh", "/bin/sh", NULL);
|
execl("/bin/sh", "/bin/sh", NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user