Keep log open, rotate it just like the journal:

(logfd, logopen): New.
(loginit): Set logfd, return success.
(logerror): Use logfd.
(logreopen): New.
(relo, main): Use it.
This commit is contained in:
Markus Armbruster 2007-10-27 15:49:45 +00:00
parent 88b44bffd3
commit 9c94a23709
4 changed files with 45 additions and 11 deletions

View file

@ -305,7 +305,8 @@ extern int has_units_with_mob(coord, coord, natid);
extern int adj_units(coord, coord, natid);
extern int has_helpful_engineer(coord x, coord y, natid cn);
/* log.c */
extern void loginit(char *);
extern int loginit(char *);
extern int logreopen(void);
extern void logerror(char *, ...) ATTRIBUTE((format (printf, 1, 2)));
/* more in misc.h */
/* maps.c */