* Join thread, with appropriate errors on failure. Name is name for the * thread (for error messages). Returns 0 on success, 1 on failure. */
| 1515 | * thread (for error messages). Returns 0 on success, 1 on failure. |
| 1516 | */ |
| 1517 | static int tloop_join(pthread_t thread, const char *name) |
| 1518 | { |
| 1519 | int err; |
| 1520 | void *tret; |
| 1521 | err = pthread_join(thread, &tret); |
| 1522 | if (!tret) { |
| 1523 | error(_("%s thread failed"), name); |
| 1524 | return 1; |
| 1525 | } |
| 1526 | if (err) { |
| 1527 | error(_("%s thread failed to join: %s"), name, strerror(err)); |
| 1528 | return 1; |
| 1529 | } |
| 1530 | return 0; |
| 1531 | } |
| 1532 | |
| 1533 | /* |
| 1534 | * Spawn the transfer tasks and then wait for them. Returns 0 on success, |
no test coverage detected