projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0600e1
)
yaz_log_init_file may take fd=<no>
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 7 Apr 2014 20:12:11 +0000
(22:12 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 7 Apr 2014 20:12:11 +0000
(22:12 +0200)
to open log file at the FD given.
src/log.c
patch
|
blob
|
history
diff --git
a/src/log.c
b/src/log.c
index
b439c4c
..
912287b
100644
(file)
--- a/
src/log.c
+++ b/
src/log.c
@@
-332,7
+332,10
@@
static void yaz_log_open_check(struct tm *tm, int force, const char *filemode)
#ifdef WIN32
yaz_log_close();
#endif
- new_file = fopen(cur_filename, filemode);
+ if (!strncmp(cur_filename, "fd=", 3))
+ new_file = fdopen(atoi(cur_filename + 3), filemode);
+ else
+ new_file = fopen(cur_filename, filemode);
if (new_file)
{
yaz_log_close();