From c00f4d99781f83c51fce80af10927023a4150331 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 7 Apr 2014 22:12:11 +0200 Subject: [PATCH] yaz_log_init_file may take fd= to open log file at the FD given. --- src/log.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index b439c4c..912287b 100644 --- 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(); -- 1.7.10.4