diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-14 15:50:00 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-14 15:50:00 +0000 |
commit | 3ccd545c9a2916f9b03fe2f5e44afe49f424f6a0 (patch) | |
tree | f62b5b76963ead92386b466a4af7dba6ee6cc55a | |
parent | 1ae45b771e3603fa33fcd8d50125bf9f50dcc74e (diff) | |
download | tor-3ccd545c9a2916f9b03fe2f5e44afe49f424f6a0.tar tor-3ccd545c9a2916f9b03fe2f5e44afe49f424f6a0.tar.gz |
crash when our logs go bad
nick, can you think of a better response here?
svn:r1268
-rw-r--r-- | src/common/log.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common/log.c b/src/common/log.c index 77e53449f..293c82781 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -85,9 +85,13 @@ logv(int severity, const char *funcname, const char *format, va_list ap) format_msg(buf, 10024, severity, funcname, format, ap); formatted = 1; } - fputs(buf, lf->file); - fflush(lf->file); - /* XXX check for EOF */ + if(fputs(buf, lf->file) == EOF) { /* error */ + assert(0); /* XXX */ + } + if(fflush(lf->file) == EOF) { /* error */ + /* don't log the error! */ + assert(0); /* XXX fail for now. what's better to do? */ + } } } |