Commit 99b5beba authored by Jan Kiszka's avatar Jan Kiszka Committed by Kevin Wolf

coroutine: Fix setup of sigaltstack coroutines

Use pthread_kill instead of process-wide kill to invoke the signal
handler used for stack switching. This may fix spurious lock-ups with
this backend, easily triggerable by extending the time window between
kill and sigsuspend.
Signed-off-by: default avatarJan Kiszka <>
Reviewed-by: default avatarPaolo Bonzini <>
Signed-off-by: default avatarKevin Wolf <>
parent 77f4c9a6
......@@ -226,7 +226,7 @@ static Coroutine *coroutine_new(void)
* called.
coTS->tr_called = 0;
kill(getpid(), SIGUSR2);
pthread_kill(pthread_self(), SIGUSR2);
sigdelset(&sigs, SIGUSR2);
while (!coTS->tr_called) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment