MCPcopy Create free account
hub / github.com/coreutils/coreutils / check_output

Function check_output

src/sort.c:4021–4032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4019 Exit with a diagnostic on failure. */
4020
4021static void
4022check_output (char const *outfile)
4023{
4024 if (outfile)
4025 {
4026 int oflags = O_WRONLY | O_BINARY | O_CLOEXEC | O_CREAT;
4027 int outfd = open (outfile, oflags, MODE_RW_UGO);
4028 if (outfd < 0)
4029 sort_die (_("open failed"), outfile);
4030 move_fd (outfd, STDOUT_FILENO);
4031 }
4032}
4033
4034/* Merge the input FILES. NTEMPS is the number of files at the
4035 start of FILES that are temporary; it is zero at the top level.

Callers 1

mainFunction · 0.85

Calls 2

sort_dieFunction · 0.85
move_fdFunction · 0.85

Tested by

no test coverage detected