| 1246 | /* Write, then empty, the output buffer 'obuf'. */ |
| 1247 | |
| 1248 | static void |
| 1249 | write_output (void) |
| 1250 | { |
| 1251 | idx_t nwritten = iwrite (STDOUT_FILENO, obuf, output_blocksize); |
| 1252 | w_bytes += nwritten; |
| 1253 | if (nwritten != output_blocksize) |
| 1254 | { |
| 1255 | diagnose (errno, _("writing to %s"), quoteaf (output_file)); |
| 1256 | if (nwritten != 0) |
| 1257 | w_partial++; |
| 1258 | quit (EXIT_FAILURE); |
| 1259 | } |
| 1260 | else |
| 1261 | w_full++; |
| 1262 | oc = 0; |
| 1263 | } |
| 1264 | |
| 1265 | /* Restart on EINTR from fdatasync. */ |
| 1266 |
no test coverage detected