]> mj.ucw.cz Git - libucw.git/blobdiff - lib/log-file.c
significant simplifications of the interface
[libucw.git] / lib / log-file.c
index 832296692f11ef78bd4e06a8b0f20109ba521b29..c6575cc42f726d3f4b1870315aea423fa8e74acc 100644 (file)
@@ -10,7 +10,6 @@
 #include "lib/lib.h"
 
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
@@ -19,7 +18,7 @@
 static char *log_name_patt;
 static int log_params;
 static int log_filename_size;
-int log_switch_nest;
+volatile int log_switch_nest;
 
 static int
 do_log_switch(struct tm *tm)
@@ -85,8 +84,6 @@ log_file(byte *name)
       log_filename[0] = 0;
       log_switch();
       log_switch_hook = internal_log_switch;
-      close(0);
-      open("/dev/null", O_RDWR, 0);
     }
 }