aboutsummaryrefslogtreecommitdiff
path: root/src/xz
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-11-23 17:39:10 +0200
committerLasse Collin <lasse.collin@tukaani.org>2023-11-23 17:39:10 +0200
commit12b89bcc9915090eb42ae638e565af44b6832a23 (patch)
treef12069eb448ad470a61256eaaf3833e8720761f6 /src/xz
parentxz: Use is_tty() in message.c. (diff)
downloadxz-12b89bcc9915090eb42ae638e565af44b6832a23.tar.xz
xz: Tweak a comment.
Diffstat (limited to 'src/xz')
-rw-r--r--src/xz/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xz/util.c b/src/xz/util.c
index 25c20765..c9ed8287 100644
--- a/src/xz/util.c
+++ b/src/xz/util.c
@@ -267,8 +267,8 @@ is_tty(int fd)
#if defined(_WIN32) && !defined(__CYGWIN__)
// There is no need to check if handle == INVALID_HANDLE_VALUE
// because it will return false anyway when used in GetConsoleMode().
- // The resulting HANDLE does not need to be closed based on Windows
- // API documentation.
+ // The resulting HANDLE is owned by the file descriptor.
+ // The HANDLE must not be closed here.
intptr_t handle = _get_osfhandle(fd);
DWORD mode;