| 2491 | } |
| 2492 | |
| 2493 | int io_end_multiplex_out(int mode) |
| 2494 | { |
| 2495 | int ret = iobuf.out_empty_len ? iobuf.out_fd : -1; |
| 2496 | |
| 2497 | if (msgs2stderr == 1 && DEBUG_GTE(IO, 2)) |
| 2498 | rprintf(FINFO, "[%s] io_end_multiplex_out(mode=%d)\n", who_am_i(), mode); |
| 2499 | |
| 2500 | if (mode != MPLX_TO_BUFFERED) |
| 2501 | io_end_buffering_out(mode); |
| 2502 | else |
| 2503 | io_flush(FULL_FLUSH); |
| 2504 | |
| 2505 | iobuf.out.len = 0; |
| 2506 | iobuf.out_empty_len = 0; |
| 2507 | if (got_kill_signal > 0) /* Just in case... */ |
| 2508 | handle_kill_signal(False); |
| 2509 | got_kill_signal = -1; |
| 2510 | |
| 2511 | return ret; |
| 2512 | } |
| 2513 | |
| 2514 | void start_write_batch(int fd) |
| 2515 | { |
no test coverage detected