Changeset d215ca3f3504e426bb1b8779a7bc391fb19cdfff
- Timestamp:
- 03/25/07 11:56:25
(1 year ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1174816585 +0000
- git-parent:
[619f831bebde76ee6582262ac75be923b82615ee]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1174816585 +0000
- Message:
Block SIGCHLD so we don't get polluted by system() in another thread[1]
(though this seem to only happen with debuggers and (?)broken OSes)
[1] system() blocks SIGCHLD, and is probably not intended for multithreading
We cannot assume that blocking calls in other libraries ignore EINTR anyway,
so the only safe approach is to block in all threads (you can unblock it in
your thread if you really want it) except the signal handling thread.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ref9815a |
rd215ca3 |
|
| 293 | 293 | { |
|---|
| 294 | 294 | case -1: |
|---|
| 295 | | if( errno == EINTR ) |
|---|
| 296 | | continue; |
|---|
| 297 | 295 | goto error; |
|---|
| 298 | 296 | |
|---|
| … | … | |
| 443 | 441 | { |
|---|
| 444 | 442 | case -1: |
|---|
| 445 | | if( errno == EINTR ) |
|---|
| 446 | | continue; |
|---|
| 447 | 443 | msg_Err (p_this, "Write error: %s", net_strerror (net_errno)); |
|---|
| 448 | 444 | goto out; |
|---|
| rd789211 |
rd215ca3 |
|
| 104 | 104 | static const int sigs[] = { SIGINT, SIGHUP, SIGQUIT, SIGTERM }; |
|---|
| 105 | 105 | /* Ignored signals */ |
|---|
| 106 | | static const int ignored[] = { SIGALRM, SIGPIPE }; |
|---|
| | 106 | static const int ignored[] = { SIGALRM, SIGPIPE, SIGCHLD }; |
|---|
| 107 | 107 | |
|---|
| 108 | 108 | sigset_t set; |
|---|