[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Race with atexit functions in system emulation
From: |
Paolo Bonzini |
Subject: |
Re: Race with atexit functions in system emulation |
Date: |
Wed, 1 Jul 2020 13:14:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 01/07/20 13:05, Alex Bennée wrote:
> Should we maybe defer the exit to once the main loop has been exited
> with a some sort of vmstop? Or could we have an atexit handler that
> kills the main thread?
Yes, I think the way to do "exit" is to use
qemu_system_shutdown_request. Possibly halt the CPU? This way you can
also obey -no-shutdown and give the user an occasion to inspect the
program. You can add a global to pass back the exit code.
Alternatively, replay_finish could just take the lock.
Paolo