-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Process.open_files fails if deleted files still visible #717
Comments
Can you paste the original traceback message? |
Here you go
|
Can you try doing |
Nope, doesn't seem to fix it as it doesn't remove the NULL characters. |
Can you put a |
|
I should have fixed this (29334f1). |
What about when the path is |
Apparently any string containing |
I was referring to this part of the readlink() function in
|
What about it? |
It only strips |
…of replacing '\x00' for the whole string
Uhm... I've just verified that there can be paths with the |
👍 Thank you. |
* giampaolo/master: (148 commits) update doc add DEVNOTES.rst Add import-time tests for psutil one import per line use with lock: set global cpu vars to None if they can't be determined at import time add more tests giampaolo#717: ignore everything after the first occurrence of '\x00' instead of replacing '\x00' for the whole string fix giampaolo#717: [Linux] Process.open_files fails if deleted files still visible. giampaolo#715: don't crash at import time if cpu_times() fail for some reason. safety measure for ZombieProcess exc giampaolo#718: process_iter() thread safety giampaolo#708: use buffering for open() only on Python 2; on Python 3 this does not have any effect so it's better to let python decide what to do little speedup for system connections fix giampaolo#708 [Linux]: speedup psutil.net_connections() and psutil.Process.connections() linux refactoring: use a wrapper around open() for binary files update doc raise no memory err if malloc() fails giampaolo#714: [OpenBSD] return shared virtual mem add test for vmem total on freebsd ...
os.readlink(file) can sometimes return path looking like this (^@ is NULL)
resulting in
when call to isfile_strict(file) is made. It seems to be happening every time I try to use open_files(proc).
The text was updated successfully, but these errors were encountered: