diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-02-17 05:16:49 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-02-17 05:16:49 +0000 |
commit | f40473668438eaba88eced8d4e78db1225e90542 (patch) | |
tree | c8a55e212d39c880faba7fd1295ad9b4fdb0d6c3 /nscd/nscd_conf.c | |
parent | f04b9a68febb179fc90095ae4f9fb2b7ec68a901 (diff) | |
download | glibc-f40473668438eaba88eced8d4e78db1225e90542.zip glibc-f40473668438eaba88eced8d4e78db1225e90542.tar.gz glibc-f40473668438eaba88eced8d4e78db1225e90542.tar.bz2 |
[BZ #18]
Update.
* nscd/nscd_conf.c (nscd_parse_file): Little optimization.
2004-02-14 Thorsten Kukuk <kukuk@suse.de>
* nscd/dbg_log.c (set_logfile): Only save name of logfile,
don't open it.
(init_logfile): New function, open logfile if requested.
* nscd/dbg_log.h: Adjust protoype for set_logfile, add init_logfile.
* nscd/nscd.c (main): Call init_logfile after forking in background.
* nscd/nscd_conf.c (nscd_parse_file): Adjust for new set_logfile.
2004-02-16 Ulrich Drepper <drepper@redhat.com>
ld.so.preload is not present [BZ #18].
Diffstat (limited to 'nscd/nscd_conf.c')
-rw-r--r-- | nscd/nscd_conf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c index 23c28ce..5ede3d1 100644 --- a/nscd/nscd_conf.c +++ b/nscd/nscd_conf.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 2000, 2003 Free Software Foundation, Inc. +/* Copyright (c) 1998, 2000, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998. @@ -55,6 +55,9 @@ nscd_parse_file (const char *fname, struct database dbs[lastdb]) if (fp == NULL) return -1; + /* The stream is not used by more than one thread. */ + (void) __fsetlocking (fp, FSETLOCKING_BYCALLER); + line = NULL; len = 0; @@ -166,10 +169,7 @@ nscd_parse_file (const char *fname, struct database dbs[lastdb]) dbg_log ("server %s is not supported\n", arg1); } else if (strcmp (entry, "logfile") == 0) - { - if (!set_logfile (arg1)) - dbg_log (_("Could not create log file \"%s\""), arg1); - } + set_logfile (arg1); else if (strcmp (entry, "debug-level") == 0) { int level = atoi (arg1); @@ -204,7 +204,7 @@ nscd_parse_file (const char *fname, struct database dbs[lastdb]) else dbg_log (_("Unknown option: %s %s %s"), entry, arg1, arg2); } - while (!feof (fp)); + while (!feof_unlocked (fp)); /* Free the buffer. */ free (line); |