On Tuesday 28 March 2006 18:15, Marco d'Itri wrote: > On Mar 28, Gabor Gombas <gombasg@sztaki.hu> wrote: > > How about restarting syslog (or it's equivalent) after relocating the > > old /dev? glibc already has infrastructure for restarting services on > > upgrade, maybe udev can borrow that. > > Harder than it looks. There are multiple syslog daemons, how can the > package know which one is installed and needs to be restarted? Look in /proc and find out which process has the log socket open? If that process belongs to one of the packaged syslog implementations (there aren't that many!) restart it. (Taking advantage of the fact that IIRC processes printing log messages open and close the socket for every messages, so looking a few times until abs(the intersection of all processes on that socket) == 1 should be safe. -- vbi -- Protect your privacy - encrypt your email: http://fortytwo.ch/gpg/intro
Attachment:
pgp5QQXk5uM2q.pgp
Description: PGP signature