]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crashes in itimers on Windows 9X.
authorEli Zaretskii <eliz@gnu.org>
Thu, 13 Feb 2014 20:54:07 +0000 (22:54 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 13 Feb 2014 20:54:07 +0000 (22:54 +0200)
 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 <oslsachem@gmail.com>.

src/ChangeLog
src/w32proc.c

index 2be308f50f9d92d35dd583f17ad4a43ec000017b..bcaa0fddceeb766c5733ca2cdee8377dd60350dd 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
+       argument to CreateThread.  This avoids segfaults on Windows 9X.
+       Reported by oslsachem <oslsachem@gmail.com>.
+
 2014-02-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix subspace record bug on HP-UX 10.20 (Bug#16717).
index 1d69c6c66b4b91595e653e7e527ad69eaa76a069..96f116578923d5820248469bec7dfd7d550365ff 100644 (file)
@@ -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)
     {