]> xenbits.xensource.com Git - libvirt.git/commitdiff
Reset logging filter function when forking
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 24 Jan 2011 12:07:21 +0000 (12:07 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 9 Feb 2011 16:21:55 +0000 (16:21 +0000)
To ensure child processes will log all error messages, reset
the logging filter function when forking

* src/util/util.c: Reset log filter in fork

src/util/util.c

index 9ac76c6c2c7806e347060c5eb7e10e396a75e0e6..6161be6fbaef510293f1645f6190352b25e96d7b 100644 (file)
@@ -384,6 +384,7 @@ int virFork(pid_t *pid) {
            get sent to stderr where they stand a fighting chance
            of being seen / logged */
         virSetErrorFunc(NULL, NULL);
+        virSetErrorLogPriorityFunc(NULL);
 
         /* Make sure any hook logging is sent to stderr, since child
          * process may close the logfile FDs */