Re: long running sessions, restarts, etc.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, 2009-09-29 at 15:32 -0400, Seth Vidal wrote:
> 
> On Tue, 29 Sep 2009, Colin Walters wrote:
> 
> > On Tue, Sep 29, 2009 at 7:23 PM, Seth Vidal <skvidal@xxxxxxxxxxxxxxxxx> wrote:
> > 
> > And I think what Bill is saying is that a lot of users will not want to logout. They will want to just restart the
> > app in question, if they are told which apps are impacted.
> > 
> > 
> > This is what I meant in saying it's case by case, not something where one policy applies to all software.  If you just
> > updated Firefox, then yes, we can and should have a system which knows how to restart just that application.
> > 
> > The discussion started about infrastructure bits, like:
> >  
> >       I don't expect to have to reboot just b/c of an issue in the sound server.
> > 
> > 
> > Not reboot for this one but relogin.  Well, you can choose not to of course, but the point of an update is to actually
> > update what's running on people's computers.  If the system doesn't reliably get us there it's not working..
> >
> 
> So what was suggested by dmalcolm was tracking down which programs in use 
> are being updated/changed and telling the user 'this application that is 
> currently in use by [userid] needs to be restarted to take advantage of 
> this update'.
> 
> I was suggesting we could get that info in yum and make it available.
> 

My thought was to do it at the level of ELF files i.e. both binaries and
the libraries consuming them.  That way, if e.g. there's a libldap
update, you know which PIDs are still mapping the old implementation of
that file on disk.

FWIW, here's some python code that tells you files per PID and PIDs per
file; this code also spots e.g. .mo files, shared fontconfig caches,
etc:

import os
import re
from pprint import pprint

pids_per_file = {}

print "Files per PID:"
for pid in os.listdir('/proc'):
    if re.match('([0-9]+)', pid):
        pid = int(pid)
        files = set()
        for line in open(os.path.join('/proc', str(pid), 'maps')):
            # Expect lines of the form:
            # '00101000-0023e000 r-xp 00000000 fd:00 1835017    /lib/libc-2.5.so'
            fields = line.split()
            if len(fields) > 5:
                file = fields[5]
                if file.startswith('/'):
                    files.add(file)
                    if file in pids_per_file:
                        pids_per_file[file].append(pid)
                    else:
                        pids_per_file[file] = [pid]
        print pid, files
                        
print
print "PIDS per file:"
pprint(pids_per_file)


-- 
Fedora-desktop-list mailing list
Fedora-desktop-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-desktop-list

[Index of Archives]     [Fedora Users]     [Fedora KDE]     [Fedora Announce]     [Fedora Docs]     [Fedora Config]     [PAM]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux