diff options
author | Peter Palfrader <peter@palfrader.org> | 2004-11-24 08:42:06 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2004-11-24 08:42:06 +0000 |
commit | f2a96ce1fe7f503f56963101dcfa805b23b4b0b4 (patch) | |
tree | e5bb0d8f04ab4bd33ecdb5fe072cd692c481ad76 /src/common/log.c | |
parent | 914d34609589fb01843c6a6827f7f8021b5aa93f (diff) | |
download | tor-f2a96ce1fe7f503f56963101dcfa805b23b4b0b4.tar.gz tor-f2a96ce1fe7f503f56963101dcfa805b23b4b0b4.zip |
Flush the logfd after we print "Tor opening log file", so we don't see those messages days later
svn:r2980
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/log.c b/src/common/log.c index e8b43228b0..c91b132759 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -104,7 +104,8 @@ static int log_tor_version(logfile_t *lf, int reset) n = _log_prefix(buf, sizeof(buf), LOG_NOTICE); tor_snprintf(buf+n, sizeof(buf)-n, "Tor %s opening %slog file.\n", VERSION, is_new?"new ":""); - if (fputs(buf, lf->file) == EOF) + if (fputs(buf, lf->file) == EOF || + fflush(lf->file) == EOF) /* error */ return -1; /* failed */ return 0; } |