[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Plash] plash logs "#1 end" to stderr even with --log-file

From: Timo Lindfors
Subject: Re: [Plash] plash logs "#1 end" to stderr even with --log-file
Date: Fri, 12 Oct 2007 15:39:58 +0300
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)


here's some more info on the issue. The call to log_free seems to
happen while arguments are parsed:

#0  log_free (obj=0x806d160) at src/log.c:55
#1  0x08050541 in filesys_obj_free (obj=0x806d160) at src/filesysobj.c:112
#2  0x0804ad37 in handle_arguments (r=0x806b008, state=0xbf905290, i=10, 
argc=13, argv=0xbf905364) at src/pola-run.c:501
#3  0x0804b64f in main (argc=13, argv=0xbf905364) at src/pola-run.c:716

There --log sets state->log to stderr

if(!strcmp(arg, "--log")) {
  if(state->log) { filesys_obj_free(state->log); }
  state->log = make_log_from_fd(STDERR_FILENO);
  goto arg_handled;

and then --log-file uses state->log once _before_ setting state->log
to the proper log file:

if(!strcmp(arg, "--log-file")) {
if(state->log) { filesys_obj_free(state->log); }
state->log = make_log_from_fd(log_fd);

best regards,
Timo Lindfors

Attachment: pgp6GsYbdicdK.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]