[libvirt] [PATCH 02/11] Reset logging filter function when forking

Eric Blake eblake at redhat.com
Fri Jan 28 17:32:55 UTC 2011


On 01/24/2011 08:13 AM, Daniel P. Berrange wrote:
> 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 |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/src/util/util.c b/src/util/util.c
> index 78ac168..db2b04d 100644
> --- a/src/util/util.c
> +++ b/src/util/util.c
> @@ -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);

ACK. (modulo the bigger issue that we can't safely use malloc to log
anything in the child in the first place, but that's pre-existing...)

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110128/25880855/attachment-0001.sig>


More information about the libvir-list mailing list