From 2178c8e4af0d6c7538b298d96c6b3680bb175115 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 9 Sep 2021 08:43:44 +0530 Subject: [PATCH] ... --- kittens/tui/dircolors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kittens/tui/dircolors.py b/kittens/tui/dircolors.py index 1e928fc15..524150444 100644 --- a/kittens/tui/dircolors.py +++ b/kittens/tui/dircolors.py @@ -241,7 +241,7 @@ def stat_at(file: str, cwd: Optional[Union[int, str]] = None, follow_symlinks: b dirfd: Optional[int] = None need_to_close = False if isinstance(cwd, str): - dirfd = os.open(cwd, os.O_RDONLY) + dirfd = os.open(cwd, os.O_RDONLY | getattr(os, 'O_CLOEXEC', 0)) need_to_close = True elif isinstance(cwd, int): dirfd = cwd