This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.stat in linux shows the wrong inode
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ammar2, omer sela
Priority: normal Keywords:

Created on 2020-03-30 15:35 by omer sela, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python_bug.png omer sela, 2020-03-30 15:35
Messages (2)
msg365324 - (view) Author: omer sela (omer sela) Date: 2020-03-30 15:35
when calling os.stat(fd).st_ino on with a file descriptor of a symbolic link it returns the inode of the original file and not of the link (picture attached)
msg365722 - (view) Author: Ammar Askar (ammar2) * (Python committer) Date: 2020-04-03 20:22
As noted in the documentation for os.stat (https://docs.python.org/3.9/library/os.html#os.stat):

> This function normally follows symlinks; to stat a symlink add the argument follow_symlinks=False, or use lstat().
History
Date User Action Args
2022-04-11 14:59:28adminsetgithub: 84299
2020-04-03 20:22:59ammar2setstatus: open -> closed

nosy: + ammar2
messages: + msg365722

resolution: not a bug
stage: resolved
2020-03-30 15:35:28omer selacreate