diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-05 08:24:43 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-05 08:24:43 +0000 |
commit | eb27c43f02ec7890c19f424de458df903745db5d (patch) | |
tree | 56dc7e91fe0c7f4df5f27af57cbe957c116c6ce5 /misc/getttyent.c | |
parent | 71cf0361ecbeedcb7630f09942011f38cc9ea322 (diff) | |
download | glibc-eb27c43f02ec7890c19f424de458df903745db5d.tar.gz glibc-eb27c43f02ec7890c19f424de458df903745db5d.tar.xz glibc-eb27c43f02ec7890c19f424de458df903745db5d.zip |
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/getttyent.c')
-rw-r--r-- | misc/getttyent.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/getttyent.c b/misc/getttyent.c index 6743ac5d7d..f474cdcacf 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; |