diff options
| author | Eli Zaretskii | 2014-02-13 22:54:07 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2014-02-13 22:54:07 +0200 |
| commit | e2607667a1c5a0dd147478fee40010506548b8d9 (patch) | |
| tree | 1a89414133e0aff4e0da41708905c821ebac7018 /src | |
| parent | 89a97129155bad4f46dd77a951038cef4c66e1f4 (diff) | |
| download | emacs-e2607667a1c5a0dd147478fee40010506548b8d9.tar.gz emacs-e2607667a1c5a0dd147478fee40010506548b8d9.zip | |
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 <oslsachem@gmail.com>.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2014-02-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last | ||
| 4 | argument to CreateThread. This avoids segfaults on Windows 9X. | ||
| 5 | Reported by oslsachem <oslsachem@gmail.com>. | ||
| 6 | |||
| 1 | 2014-02-13 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2014-02-13 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | Fix subspace record bug on HP-UX 10.20 (Bug#16717). | 9 | 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) | |||
| 566 | static int | 566 | static int |
| 567 | start_timer_thread (int which) | 567 | start_timer_thread (int which) |
| 568 | { | 568 | { |
| 569 | DWORD exit_code; | 569 | DWORD exit_code, tid; |
| 570 | HANDLE th; | 570 | HANDLE th; |
| 571 | struct itimer_data *itimer = | 571 | struct itimer_data *itimer = |
| 572 | (which == ITIMER_REAL) ? &real_itimer : &prof_itimer; | 572 | (which == ITIMER_REAL) ? &real_itimer : &prof_itimer; |
| @@ -604,7 +604,7 @@ start_timer_thread (int which) | |||
| 604 | the way of threads we start to wait for subprocesses. See also | 604 | the way of threads we start to wait for subprocesses. See also |
| 605 | new_child below. */ | 605 | new_child below. */ |
| 606 | itimer->timer_thread = CreateThread (NULL, 64 * 1024, timer_loop, | 606 | itimer->timer_thread = CreateThread (NULL, 64 * 1024, timer_loop, |
| 607 | (void *)itimer, 0x00010000, NULL); | 607 | (void *)itimer, 0x00010000, &tid); |
| 608 | 608 | ||
| 609 | if (!itimer->timer_thread) | 609 | if (!itimer->timer_thread) |
| 610 | { | 610 | { |