| 941 | } |
| 942 | |
| 943 | void noop_io_until_death(void) |
| 944 | { |
| 945 | char buf[1024]; |
| 946 | |
| 947 | if (!iobuf.in.buf || !iobuf.out.buf || iobuf.in_fd < 0 || iobuf.out_fd < 0 || kluge_around_eof) |
| 948 | return; |
| 949 | |
| 950 | /* If we're talking to a daemon over a socket, don't short-circuit this logic */ |
| 951 | if (msgs2stderr && daemon_connection >= 0) |
| 952 | return; |
| 953 | |
| 954 | kluge_around_eof = 2; |
| 955 | /* Setting an I/O timeout ensures that if something inexplicably weird |
| 956 | * happens, we won't hang around forever. */ |
| 957 | if (!io_timeout) |
| 958 | set_io_timeout(60); |
| 959 | |
| 960 | while (1) |
| 961 | read_buf(iobuf.in_fd, buf, sizeof buf); |
| 962 | } |
| 963 | |
| 964 | /* Buffer a message for the multiplexed output stream. Is not used for (normal) MSG_DATA. */ |
| 965 | int send_msg(enum msgcode code, const char *buf, size_t len, int convert) |
no test coverage detected