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

Function iclose

src/dd.c:909–919  ·  view source on GitHub ↗

Close FD. Return 0 if successful, -1 (setting errno) otherwise. If close fails with errno == EINTR, POSIX says the file descriptor is in an unspecified state, so keep trying to close FD but do not consider EBADF to be an error. Do not process signals. This all differs somewhat from functions like ifdatasync and ifsync. */

Source from the content-addressed store, hash-verified

907 consider EBADF to be an error. Do not process signals. This all
908 differs somewhat from functions like ifdatasync and ifsync. */
909static int
910iclose (int fd)
911{
912 if (close (fd) != 0)
913 do
914 if (errno != EINTR)
915 return -1;
916 while (close (fd) != 0 && errno != EBADF);
917
918 return 0;
919}
920
921static int synchronize_output (void);
922

Callers 1

cleanupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected