-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 11/02/2016 17:49, Dimitris Aragiorgis wrote: >> Perhaps when the logfile is opened you can replace the straight >> fopen with >> >> qemu_logfile = fopen(...); if (daemonized) { >> dup2(fileno(qemu_logfile), STDERR_FILENO); fclose(qemu_logfile); >> qemu_logfile = stderr; } >> >> Then the logfile will never be closed by qemu_log_close, and >> stderr will always be sent to it. Does this look sane? >> > > I guess the above snippet will go in do_qemu_set_log(), right? > > If true, we have to open the logfile even if the -d option is not > given. Right, but only if daemonize. > Besides that, log.c should become aware of daemonize. Yes. Paolo