| 957 | /* exit with a _single_ "write error" diagnostic. */ |
| 958 | |
| 959 | static inline void |
| 960 | write_error (void) |
| 961 | { |
| 962 | int saved_errno = errno; |
| 963 | fflush (stdout); /* Last attempt to write any buffered data. */ |
| 964 | fpurge (stdout); /* Ensure nothing buffered that might induce an error. */ |
| 965 | clearerr (stdout); /* Avoid extraneous diagnostic from close_stdout. */ |
| 966 | error (EXIT_FAILURE, saved_errno, _("write error")); |
| 967 | } |
| 968 | |
| 969 | /* Like stpncpy, but do ensure that the result is NUL-terminated, |
| 970 | and do not NUL-pad out to LEN. I.e., when strnlen (src, len) == len, |
no outgoing calls
no test coverage detected