qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Moving alarm_timer assignment before atexit()


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] Moving alarm_timer assignment before atexit()
Date: Wed, 7 Aug 2013 09:57:19 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Aug 07, 2013 at 08:39:19AM +0200, Laszlo Ersek wrote:
> On 08/07/13 01:29, Amos Kong wrote:
> > We register exit clean function by atexit(),
> > but alarm_timer is NULL here. If exit is caused
> > between atexit() and alarm_timer assignment,
> > real timer can't be cleaned.
> 
> That's correct in general, but I don't see how it could happen in the
> code being patched. pthread_atfork() won't call exit().

Agreed.  I can remember thinking about this when reading the code and
deciding not to bother changing it.

Since the patch is on the list though, we might as well apply it.

The only thing I suggest changing is to note that this is currently not
a bug, just a clean-up.

Reviewed-by: Stefan Hajnoczi <address@hidden>



reply via email to

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