On 08/07/2016 17:42, Marc-André Lureau wrote: > Alternatively, if it's better to keep the atexit(net_cleanup), we > could have atexit(qemu_chr_cleanup) here, so it's only called on > normal exit and after net_cleanup.
No, atexit functions are called in LIFO order (which actually makes sense if you think about it :)). Paolo