aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-05 08:24:43 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-05 08:24:43 +0000
commiteb27c43f02ec7890c19f424de458df903745db5d (patch)
tree56dc7e91fe0c7f4df5f27af57cbe957c116c6ce5 /misc
parent71cf0361ecbeedcb7630f09942011f38cc9ea322 (diff)
downloadglibc-eb27c43f02ec7890c19f424de458df903745db5d.zip
glibc-eb27c43f02ec7890c19f424de458df903745db5d.tar.gz
glibc-eb27c43f02ec7890c19f424de458df903745db5d.tar.bz2
Update.
1998-05-23 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/unix/sysv/linux/arm/syscalls.list: Add `syscall'. * sysdeps/unix/sysv/linux/arm/syscall.S: Deleted. 1998-07-05 Ulrich Drepper <drepper@cygnus.com> * misc/getttyent.c (getttyent): Explicitly lock the FILE and use _unlocked functions. * inet/ruserpass.c (ruserpass): Use _unlocked functions since this is a private FILE.
Diffstat (limited to 'misc')
-rw-r--r--misc/getttyent.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/getttyent.c b/misc/getttyent.c
index 6743ac5..f474cdc 100644
--- a/misc/getttyent.c
+++ b/misc/getttyent.c
@@ -71,12 +71,13 @@ getttyent()
if (!tf && !setttyent())
return (NULL);
+ flockfile (tf);
for (;;) {
if (!fgets(p = line, sizeof(line), tf))
return (NULL);
/* skip lines that are too big */
if (!index(p, '\n')) {
- while ((c = getc(tf)) != '\n' && c != EOF)
+ while ((c = getc_unlocked(tf)) != '\n' && c != EOF)
;
continue;
}
@@ -85,6 +86,7 @@ getttyent()
if (*p && *p != '#')
break;
}
+ funlockfile(tf);
zapchar = 0;
tty.ty_name = p;