Changeset e5896809c2ea5686fe1c0831c72b9e8e5a7c1e31
- Timestamp:
- 02/10/08 16:52:00
(7 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1202658720 +0000
- git-parent:
[55153f42e23bde1a5e9ca900a93d6adf57178ded]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1202658720 +0000
- Message:
Really (I swear) implement the waitpipe in net_write
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r0b28505 |
re589680 |
|
| 285 | 285 | if (poll (ufd, sizeof (ufd) / sizeof (ufd[0]), -1) < 0) |
|---|
| 286 | 286 | { |
|---|
| 287 | | if (errno =! EINTR) |
|---|
| | 287 | if (errno != EINTR) |
|---|
| 288 | 288 | goto error; |
|---|
| 289 | 289 | continue; |
|---|
| … | … | |
| 307 | 307 | if (ufd[1].revents) |
|---|
| 308 | 308 | { |
|---|
| | 309 | assert (p_this->b_die); |
|---|
| 309 | 310 | msg_Dbg (p_this, "socket %d polling interrupted", fd); |
|---|
| 310 | 311 | #if defined(WIN32) || defined(UNDER_CE) |
|---|
| … | … | |
| 412 | 413 | { |
|---|
| 413 | 414 | msg_Err (p_this, "Write error: %m"); |
|---|
| 414 | | goto out; |
|---|
| | 415 | goto error; |
|---|
| 415 | 416 | } |
|---|
| 416 | 417 | continue; |
|---|
| … | … | |
| 424 | 425 | if (ufd[1].revents) |
|---|
| 425 | 426 | break; |
|---|
| | 427 | } |
|---|
| | 428 | else |
|---|
| | 429 | { |
|---|
| | 430 | if (ufd[1].revents) |
|---|
| | 431 | { |
|---|
| | 432 | assert (p_this->b_die); |
|---|
| | 433 | errno = EINTR; |
|---|
| | 434 | goto error; |
|---|
| | 435 | } |
|---|
| 426 | 436 | } |
|---|
| 427 | 437 | |
|---|
| … | … | |
| 446 | 456 | } |
|---|
| 447 | 457 | |
|---|
| 448 | | out: |
|---|
| 449 | 458 | if ((i_total > 0) || (i_data == 0)) |
|---|
| 450 | 459 | return i_total; |
|---|
| 451 | 460 | |
|---|
| | 461 | error: |
|---|
| 452 | 462 | return -1; |
|---|
| 453 | 463 | } |
|---|