summaryrefslogtreecommitdiff
path: root/daemons
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-06-27 20:44:45 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-06-27 20:44:45 +0000
commit0d4c2d45b84d3c654c392486d214e3df45865e6f (patch)
treea8ce0b82b82a9297c13370542977b5ba1cee2a89 /daemons
parente2111248d2b7571b96b1f36f498cc3550f219430 (diff)
(main): Repair loop.
Diffstat (limited to 'daemons')
-rw-r--r--daemons/getty.c7
1 files changed, 4 insertions, 3 deletions
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");