chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
670802d
)
main: if we fail to acquire a terminal for the crash shell, warn but continue
author
Lennart Poettering
<lennart@poettering.net>
Tue, 18 May 2010 01:27:02 +0000
(
03:27
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 18 May 2010 01:27:02 +0000
(
03:27
+0200)
src/main.c
patch
|
blob
|
history
diff --git
a/src/main.c
b/src/main.c
index bba2975e467fea4112bc95a4ba7bd9ad6872310a..e2d2ab5e647ad83bf8cf2442f4982cd6a1eff5bd 100644
(file)
--- 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;
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));
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));
log_error("Failed to duplicate terminal fd: %s", strerror(-r));
- _exit(1);
- }
execl("/bin/sh", "/bin/sh", NULL);
execl("/bin/sh", "/bin/sh", NULL);