After actually reading what Mika had said about the bug still affecting
upstream, I have identified another error message that should probably
not cause agetty to abort:

    /dev/ttyS2: cannot set process group: Inappropriate ioctl for device

(Unless these errors are all symptoms of another problem, that is.)

I have briefly verified that agetty no longer exits and executes login.
This was on grml64-full 2012.05 using a machine with IPMI serial console
emulation.

Cheers,
-Hilko

diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index b068164..b0a1f45 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -919,7 +919,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
 
 		if (((tid = tcgetsid(fd)) < 0) || (pid != tid)) {
 			if (ioctl(fd, TIOCSCTTY, 1) == -1)
-				log_err("/dev/%s: cannot get controlling tty: %m", tty);
+				log_warn("/dev/%s: cannot get controlling tty: %m", tty);
 		}
 
 		if (op->flags & F_HANGUP) {
@@ -944,7 +944,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
 			log_err(_("/dev/%s: cannot open as standard input: %m"), tty);
 		if (((tid = tcgetsid(STDIN_FILENO)) < 0) || (pid != tid)) {
 			if (ioctl(STDIN_FILENO, TIOCSCTTY, 1) == -1)
-				log_err("/dev/%s: cannot get controlling tty: %m", tty);
+				log_warn("/dev/%s: cannot get controlling tty: %m", tty);
 		}
 
 	} else {
@@ -960,7 +960,7 @@ static void open_tty(char *tty, struct termios *tp, struct options *op)
 	}
 
 	if (tcsetpgrp(STDIN_FILENO, pid))
-		log_err("/dev/%s: cannot set process group: %m", tty);
+		log_warn("/dev/%s: cannot set process group: %m", tty);
 
 	/* Get rid of the present outputs. */
 	close(STDOUT_FILENO);

Reply via email to