about summary refs log tree commit diff
path: root/misc/getttyent.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-02-22 18:05:04 +0000
committerUlrich Drepper <drepper@redhat.com>1999-02-22 18:05:04 +0000
commit3f933dc2ef1aa201cd277a480b3954afa1f62b07 (patch)
tree834ea1edc2342589cf5f5e3bca59fa1f7028ed2a /misc/getttyent.c
parent69b3b3cb3873d59edfebae0cb7db58166d78f3a6 (diff)
downloadglibc-3f933dc2ef1aa201cd277a480b3954afa1f62b07.tar.gz
glibc-3f933dc2ef1aa201cd277a480b3954afa1f62b07.tar.xz
glibc-3f933dc2ef1aa201cd277a480b3954afa1f62b07.zip
Update.
1999-02-23  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* elf/dl-error.c (_dl_signal_cerror): New function.
	(_dl_signal_error): Don't call receiver function.
	* elf/dl-lookup.c (_dl_lookup_symbol): Call _dl_signal_cerror
	instead of _dl_signal_error when reporting references to undefined
	symbols or versions.
	(_dl_lookup_versioned_symbol): Likewise.
	(_dl_lookup_versioned_symbol_skip): Likewise.
	* elf/dl-version.c (match_symbol): Likewise.

	* elf/ldsodefs.h: Declare _dl_signal_cerror.

	* misc/getttyent.c (getttyent): Release lock on stream later to
	also protect global variable zapchar.
Diffstat (limited to 'misc/getttyent.c')
-rw-r--r--misc/getttyent.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/getttyent.c b/misc/getttyent.c
index f73cb79cda..009ad9c7f6 100644
--- a/misc/getttyent.c
+++ b/misc/getttyent.c
@@ -93,7 +93,6 @@ getttyent()
 		if (*p && *p != '#')
 			break;
 	}
-	funlockfile(tf);
 
 	zapchar = 0;
 	tty.ty_name = p;
@@ -124,6 +123,8 @@ getttyent()
 		else
 			break;
 	}
+	/* We can release the lock only here since `zapchar' is global.  */
+	funlockfile(tf);
 
 	if (zapchar == '#' || *p == '#')
 		while ((c = *++p) == ' ' || c == '\t')