Changeset 0054378d6e90f6796759fca438a5ff209e19fbf8
- Timestamp:
- 01/03/07 22:38:58
(2 years ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1172785138 +0000
- git-parent:
[7cdfb7ee8b66706492e2f781ded8deeef0566969]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1172785138 +0000
- Message:
Fix a hang when quitting vlc on Mac OS X. This hang is due to the signal thread that isn't cancelled properly, because Mac OS X's sigwait is not a pthread cancellation point as it ought to be according to POSIX.1.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rc13d67b |
r0054378 |
|
| 178 | 178 | #if !defined(WIN32) && !defined(UNDER_CE) |
|---|
| 179 | 179 | pthread_cancel (sigth); |
|---|
| | 180 | # ifdef __APPLE__ |
|---|
| | 181 | /* In Mac OS X up to 10.4.8 sigwait (among others) is not a pthread |
|---|
| | 182 | * cancellation point, so we throw a dummy quit signal to end |
|---|
| | 183 | * sigwait() in the sigth thread */ |
|---|
| | 184 | pthread_kill (sigth, SIGQUIT); |
|---|
| | 185 | # endif |
|---|
| 180 | 186 | pthread_join (sigth, NULL); |
|---|
| 181 | 187 | #endif |
|---|
| … | … | |
| 201 | 207 | int i_signal, state; |
|---|
| 202 | 208 | (void)sigwait (set, &i_signal); |
|---|
| | 209 | |
|---|
| | 210 | #ifdef __APPLE__ |
|---|
| | 211 | /* In Mac OS X up to 10.4.8 sigwait (among others) is not a pthread |
|---|
| | 212 | * cancellation point */ |
|---|
| | 213 | pthread_testcancel(); |
|---|
| | 214 | #endif |
|---|
| 203 | 215 | |
|---|
| 204 | 216 | /* Once a signal has been trapped, the termination sequence will be |
|---|