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

Function move_fd

src/sort.c:1062–1071  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1060/* Move OLDFD to NEWFD. If OLDFD != NEWFD, NEWFD is not close-on-exec. */
1061
1062static void
1063move_fd (int oldfd, int newfd)
1064{
1065 if (oldfd != newfd)
1066 {
1067 /* These should never fail for our usage. */
1068 ignore_value (dup2 (oldfd, newfd));
1069 ignore_value (close (oldfd));
1070 }
1071}
1072
1073/* Setup ACTION to move OLDFD to NEWFD. If OLDFD != NEWFD, NEWFD is not
1074 close-on-exec. Returns 0 if successful, or an error number otherwise. */

Callers 1

check_outputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected