Skip to content

Commit ac70c7e

Browse files
authored
Update get-osfhandle.md _close
Modify wording around using _close on file descriptors owned by FILE*s
1 parent be0104d commit ac70c7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/c-runtime-library/reference/get-osfhandle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Returns an operating-system file handle if *fd* is valid. Otherwise, the invalid
4242

4343
## Remarks
4444

45-
To close a file whose operating system (OS) file handle is obtained by `_get_osfhandle`, call [\_close](../../c-runtime-library/reference/close.md) on the file descriptor *fd*. Do not call `CloseHandle` on the return value of this function. The underlying OS file handle is owned by the *fd* file descriptor, and is closed when `_close` is called on *fd*. If the file descriptor is owned by a `FILE *` stream, then calling [fclose](../../c-runtime-library/reference/fclose-fcloseall.md) on that `FILE *` stream closes both the file descriptor and the underlying OS file handle. In this case, you do not need to call `_close` on the file descriptor.
45+
To close a file whose operating system (OS) file handle is obtained by `_get_osfhandle`, call [\_close](../../c-runtime-library/reference/close.md) on the file descriptor *fd*. Do not call `CloseHandle` on the return value of this function. The underlying OS file handle is owned by the *fd* file descriptor, and is closed when `_close` is called on *fd*. If the file descriptor is owned by a `FILE *` stream, then calling [fclose](../../c-runtime-library/reference/fclose-fcloseall.md) on that `FILE *` stream closes both the file descriptor and the underlying OS file handle. In this case, do not call `_close` on the file descriptor.
4646

4747
## Requirements
4848

0 commit comments

Comments
 (0)