Closed yochananmarqos closed 2 years ago
Quick low-tech hack until it's fixed:
#!/usr/bin/env python3
import re
from subprocess import run
import psutil
def main():
"""docstring for main"""
for process in [
psutil.Process(int(pid))
for pid in re.findall(
re.compile(r"[0-9]{3,}"),
run(["needrestart"], capture_output=True).stdout.decode(),
)
]:
__import__("pprint").pprint(process)
if __name__ == "__main__":
main()
This annoyed my just enough to look into it. Turns out it's a bug in the Proc::ProcessTable module. A fix was released in August (0.61) so updating to a newer version should fix it.
@djl I just updated to 0.634 and it's working great, thanks for finding that. I flagged the Arch community package out of date as well.
With the latest commit 5c20a9e on Manjaro GNOME (unstable branch):