summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-04-06 14:46:08 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-04-06 14:48:04 +0100
commitdd6181d50c1806acf9720d6ec038af826c732a00 (patch)
treea808106bef80f591832aba1beb9a62e9dd5571d6
parent43fa738d0964901448076cfd1f63f4e4f28f16a4 (diff)
Use raise() rather than kill()
MinGW portability fix for "Cause the X server to terminate if the WM internal client thread exits due to an error". Use C89 raise(SIGTERM) rather than the POSIX equivalent kill(getpid(), SIGTERM). This still isn't quite right: On Cygwin for a clean shutdown we need send the signal to the server thread so it interrupts select(), but it's unclear that can happen at all for MinGW. Restarting the WM thread seems like a better alternative. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r--hw/xwin/winmultiwindowwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xwin/winmultiwindowwm.c b/hw/xwin/winmultiwindowwm.c
index 41c80afe8..7833932fe 100644
--- a/hw/xwin/winmultiwindowwm.c
+++ b/hw/xwin/winmultiwindowwm.c
@@ -1623,7 +1623,7 @@ static void
winMultiWindowThreadExit(void *arg)
{
/* multiwindow client thread has exited, stop server as well */
- kill(getpid(), SIGTERM);
+ raise(SIGTERM);
}
/*