diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-08-16 16:14:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-08-16 16:14:36 +0000 |
commit | 3b4821547f38695990aaeea8f8f9b2929535aab1 (patch) | |
tree | cb3a588747979acd44b4a0d62746414dee632122 /usr.bin/passwd/local_passwd.c | |
parent | 0ef29ddfd2071ccfb41db68cc4295fa1b2bec89a (diff) |
At Theo's request only print 'Please wait' if don't get the lock
on the first try.
Diffstat (limited to 'usr.bin/passwd/local_passwd.c')
-rw-r--r-- | usr.bin/passwd/local_passwd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/passwd/local_passwd.c b/usr.bin/passwd/local_passwd.c index 4e3bc1ae69c..4a688506053 100644 --- a/usr.bin/passwd/local_passwd.c +++ b/usr.bin/passwd/local_passwd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: local_passwd.c,v 1.16 2001/07/07 00:10:49 millert Exp $ */ +/* $OpenBSD: local_passwd.c,v 1.17 2001/08/16 16:14:35 millert Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static const char sccsid[] = "from: @(#)local_passwd.c 5.5 (Berkeley) 5/6/91";*/ -static const char rcsid[] = "$OpenBSD: local_passwd.c,v 1.16 2001/07/07 00:10:49 millert Exp $"; +static const char rcsid[] = "$OpenBSD: local_passwd.c,v 1.17 2001/08/16 16:14:35 millert Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -112,14 +112,16 @@ local_passwd(uname, authenticated) for (;;) { int i, c, d; - (void)fputs("Please wait", stderr); for (i = 0; i < (s ? 64 : 8) && (tfd = pw_lock(0)) == -1; i++) { + if (i == 0) + (void)fputs("Please wait", stderr); (void)signal(SIGINT, kbintr); fputc('.', stderr); usleep(250000); (void)signal(SIGINT, SIG_IGN); } - fputc('\n', stderr); + if (i) + fputc('\n', stderr); if (tfd != -1) break; |