(long fd)
| 107 | } |
| 108 | |
| 109 | public static int close(long fd) { |
| 110 | // do not close `stdin` and `stdout` |
| 111 | if (fd > 0 && toOsFd(fd) > 2) { |
| 112 | return fdCache.close(fd); |
| 113 | } |
| 114 | // failed to close |
| 115 | return -1; |
| 116 | } |
| 117 | |
| 118 | public static int closeDetached(int osFd) { |
| 119 | return close0(osFd); |