From e2607667a1c5a0dd147478fee40010506548b8d9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 13 Feb 2014 22:54:07 +0200 Subject: [PATCH] Fix crashes in itimers on Windows 9X. src/w32proc.c (start_timer_thread): Pass a non-NULL pointer as last argument to CreateThread. This avoids segfaults on Windows 9X. Reported by oslsachem . --- src/ChangeLog | 6 ++++++ src/w32proc.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2be308f50f9..bcaa0fddcee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-02-13 Eli Zaretskii + + * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last + argument to CreateThread. This avoids segfaults on Windows 9X. + Reported by oslsachem . + 2014-02-13 Paul Eggert Fix subspace record bug on HP-UX 10.20 (Bug#16717). diff --git a/src/w32proc.c b/src/w32proc.c index 1d69c6c66b4..96f11657892 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -566,7 +566,7 @@ init_timers (void) static int start_timer_thread (int which) { - DWORD exit_code; + DWORD exit_code, tid; HANDLE th; struct itimer_data *itimer = (which == ITIMER_REAL) ? &real_itimer : &prof_itimer; @@ -604,7 +604,7 @@ start_timer_thread (int which) the way of threads we start to wait for subprocesses. See also new_child below. */ itimer->timer_thread = CreateThread (NULL, 64 * 1024, timer_loop, - (void *)itimer, 0x00010000, NULL); + (void *)itimer, 0x00010000, &tid); if (!itimer->timer_thread) { -- 2.39.2