1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* gpg-agent.c (parse_rereadable_options): New arg REREAD. Allow

changing oLogFile.
(current_logfile): New.

* logging.c (log_set_file): Make sure the log stream will be
closed even if the stderr fileno will be assigned to a new socket.
This commit is contained in:
Werner Koch 2004-04-30 03:58:21 +00:00
parent 6d96ca16cf
commit 623fad67a5
4 changed files with 42 additions and 8 deletions

View file

@ -211,7 +211,7 @@ fun_closer (void *cookie_arg)
/* Set the file to write log to. The sepcial names NULL and "_" may
/* Set the file to write log to. The special names NULL and "-" may
be used to select stderr and names formatted like
"socket:///home/foo/mylogs" may be used to write the logging to the
socket "/home/foo/mylogs". If the connection to the socket fails
@ -258,6 +258,13 @@ log_set_file (const char *name)
/* We always need to print the prefix and the pid, so that the
server reading the socket can do something meanigful. */
force_prefixes = 1;
/* On success close the old logstream right now, so that we are
really sure it has been closed. */
if (fp)
{
fclose (logstream);
logstream = NULL;
}
}
else
fp = (name && strcmp(name,"-"))? fopen (name, "a") : stderr;