Bug 90015

Summary: Implement "needrestart" equivalent functionality
Product: systemd Reporter: Damjan Georgievski <gdamjan>
Component: generalAssignee: systemd-bugs
Status: RESOLVED WONTFIX QA Contact: systemd-bugs
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Damjan Georgievski 2015-04-13 13:40:09 UTC
One common operation after every update of system packages is checking which of the running services are still using old libraries. In the case of security updates (openssl comes in mind) it's of essential importance to restart these services.

I do this by using:

    sudo lsof | grep -e '(deleted|DEL)' | grep -v /tmp | grep -v /dev/zero

although I guess better ways are possible. It will be great if systemd/systemctl could do this, and smarter.
Comment 1 Lennart Poettering 2015-04-13 13:48:59 UTC
This cannot be implemented properly, since only a subset of dependencies on files can be read from /proc (think dynamically loaded modules). And we will not implement logic like you propose if it cannot hold the promise it makes and only sees a small subset of the actual dependencies.

This has been requested before, and I know that DEbian used to implement this, but I think it's a very wrong thing to rpovide, since it suggests to the admin that it could comprehensively answer the question of restarting, but it absolutely cannot.

And yeah, dynamically loaded modules are not the exception. FOr example, glibc's own NSS uses that, or ICU, and everything else.

Sorry, this cannot work!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.