Bug 19227 - detect when processes need to be restarted
Summary: detect when processes need to be restarted
Status: RESOLVED NOTABUG
Alias: None
Product: PackageKit
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Richard Hughes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-21 20:18 UTC by Paul Wise
Modified: 2018-08-21 15:53 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Wise 2008-12-21 20:18:59 UTC
It would be great if PackageKit could detect processes that need to be restarted after upgrades of packages they depend on. Examples of this situation are when a library gets a security upgrade and system daemons need to be restarted to pick up the new version of the library. Some python code that does something similar is /usr/sbin/checkrestart in the debian-goodies package in Debian.

The UI options that could be shown when stuff needs to be restarted:

Restart system processes (would run /etc/init.d/foo restart).
Restart session and applications (would detect when the gnome/kde session needs restarting and restart gnome-session)
Restart applications (would restart open apps)

For experts there could be a details listing, containing Window names/icons, PIDs, filenames, package names and command-line listings.

It should be able to deal with daemons and apps written in scripting languages like python and perl.
Comment 1 Richard Hughes 2009-01-02 00:35:16 UTC
It already detect processes in use, and asks the user to restart the session (logout) -- I guess detecting shared libraries that are being used could be added too. Do you know how to detect this in C?
Comment 2 Paul Wise 2009-01-02 16:37:28 UTC
Not sure about in C, but in shell it would be:

lsof | egrep '(DEL|\(path inode=[0-9]+\)$| \(deleted\)$)'

And then remove files from the resulting list that were not installed by one of the packages on the system. Then ask the user to restart the processes with those files open.

There is a python implementation here:

http://arcdraco.net/~dragon/checkrestart

Unfortunately for stuff written in scripting/vm languages like python/perl/etc you might need to do something else.

Do you also detect when the kernel has been upgraded and a reboot is needed?
Comment 3 Richard Hughes 2018-08-21 15:53:10 UTC
We moved the upstream bugtracker to GitHub a long time ago. If this issue still affects you please re-create the issue here: https://github.com/hughsie/PackageKit/issues
 
Sorry for the impersonal message, and fingers crossed your issue no longer happens. Thanks.


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.