From 0d4c2d45b84d3c654c392486d214e3df45865e6f Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 27 Jun 1996 20:44:45 +0000 Subject: (main): Repair loop. --- daemons/getty.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'daemons/getty.c') diff --git a/daemons/getty.c b/daemons/getty.c index ef72cfc3..a7f4630d 100644 --- a/daemons/getty.c +++ b/daemons/getty.c @@ -60,17 +60,18 @@ main (int argc, char **argv) revoke (ttyname); sleep (2); /* leave DTR down for a bit */ - for (;;) + do { tty = open (ttyname, O_RDWR); if (tty == -1) { syslog (LOG_ERR, "%s: %m", ttyname); closelog (); + sleep (60); } - sleep (60); } - + while (tty == -1); + login_tty (tty); asprintf (&arg, "TERM=%s", tt ? tt->ty_type : "unknown"); -- cgit v1.2.3