Lines Matching refs:fd
32 * Calls close(2) on 'fd'. Also resets the internal int to -1. Does nothing if 'fd' is null
35 public static void close(FileDescriptor fd) throws IOException {
37 if (fd != null && fd.valid()) {
38 Libcore.os.close(fd);
60 * Closes 'fd', ignoring any exceptions. Does nothing if 'fd' is null or invalid.
62 public static void closeQuietly(FileDescriptor fd) {
64 IoUtils.close(fd);
82 * Sets 'fd' to be blocking or non-blocking, according to the state of 'blocking'.
84 public static void setBlocking(FileDescriptor fd, boolean blocking) throws IOException {
86 int flags = Libcore.os.fcntlVoid(fd, F_GETFL);
92 Libcore.os.fcntlLong(fd, F_SETFL, flags);