Skip to content

Commit c216922

Browse files
authored
use fchmod (#214)
Co-authored-by: Jake Fennick <[email protected]>
1 parent dfb8cc7 commit c216922

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/filelock/_unix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _acquire(self) -> None:
3535
open_flags = os.O_RDWR | os.O_CREAT | os.O_TRUNC
3636
fd = os.open(self._lock_file, open_flags, self._mode)
3737
try:
38-
os.chmod(fd, self._mode)
38+
os.fchmod(fd, self._mode)
3939
except PermissionError:
4040
pass # This locked is not owned by this UID
4141
try:

whitelist.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ caplog
55
eacces
66
enosys
77
extlinks
8+
fchmod
89
filelock
910
filemode
1011
fspath

0 commit comments

Comments
 (0)