Re: [Qemu-devel] [PATCH] cpus.c: Use pthread_sigmask() rather than sigprocmask()

2016-05-17 Thread Paolo Bonzini
On 16/05/2016 19:37, Peter Maydell wrote: > The only other sigprocmask() uses are in linux-user, apart from > a couple in net/tap.c, where they're used as part of forking and > spawning the helper process. I suspect this should be using > qemu_fork() instead of doing it all by hand, wrongly... I

[Qemu-devel] [PATCH] cpus.c: Use pthread_sigmask() rather than sigprocmask()

2016-05-16 Thread Peter Maydell
On Linux, sigprocmask() and pthread_sigmask() are in practice the same thing (they only set the signal mask for the calling thread), but the documentation states that the behaviour of sigprocmask() in a multithreaded process is undefined. Use pthread_sigmask() instead (which is what we do in almost

Re: [Qemu-devel] [PATCH] cpus.c: Use pthread_sigmask() rather than sigprocmask()

2016-05-16 Thread Peter Maydell
On 16 May 2016 at 18:33, Peter Maydell wrote: > On Linux, sigprocmask() and pthread_sigmask() are in practice the > same thing (they only set the signal mask for the calling thread), > but the documentation states that the behaviour of sigprocmask() in a > multithreaded process is undefined. Use p