qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [V4 PATCH 2/8] Provide chroot environment server side i


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [V4 PATCH 2/8] Provide chroot environment server side interfaces
Date: Tue, 1 Feb 2011 12:02:45 +0000

On Tue, Feb 1, 2011 at 10:32 AM, Daniel P. Berrange <address@hidden> wrote:
> There is a subtle problem with using fork() in a multi-threaded
> program that I was recently made aware of in libvirt. In short
> if you have a multi-threaded program that calls fork(), then
> the child process must only use POSIX functions that are
> declared 'async signal safe', until the child calls exec() or
> exit().  In particular any malloc()/free() related functions
> are *not* async signal safe.

In this particular patch the fork() call happens quite early so the
risk should be low but it would be nice to investigate this issue
fully.

Stefan



reply via email to

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