[Infrastructures] Best/good/non-sucky way to restart daemons when libs are updated?
Joel Huddleston
joelh@paring.cyberzod.com
Tue, 8 Mar 2005 16:49:01 -0700
Quoting Wil Cooley <wcooley@nakedape.cc>:
> Also Sprach DJ Gregor <dj@gregor.com> on Tue, Mar 08, 2005 at 10:24:37AM
> PST:
> > You could run "ldd" on each of the daemons and check the update time on
> > the libraries listed.
>
> That's a good start, but it would fail to take into consideration
> dynamically-loaded modules, for which there is no solution other than
> explictly listing.
>
Perhaps not... Instead of running ldd on each of the daemons, since they are in
memory and any library they are using must be "open", you could use lsof to
examine which libraries are currently mapped to memory. You could then check the
mtime of library in the same way that you would for ldd. That should catch
everything that is active.
--
Joel Huddleston
eka joelh@cyberzod.com
"Try going to your local middle-school chess club, hand out crystal
meth and guns. That might be good practice." -- Pvt. Church ( when
asked how to prepare for ones first exposure to the Internet.)