Print only the complete information if the fd is valid itself (in is_valid_fd).
[reactos.git] / reactos / lib / crt / io / close.c
1 #include "precomp.h"
2 #include <io.h>
3 #include <internal/file.h>
4
5 #define NDEBUG
6 #include <internal/debug.h>
7
8 /*
9 * @implemented
10 */
11 int _close(int _fd)
12 {
13 TRACE("_close(%i)", _fd);
14
15 if (_fd == -1)
16 return(-1);
17 if (CloseHandle((HANDLE)_get_osfhandle(_fd)) == FALSE)
18 return(-1);
19 //return
20 free_fd(_fd);
21 return(0);
22 }