[Buildd-tools-devel] Bug#391319: Bug#391319: schroot: leftover processes cause umount to fail
Kees Cook
kees at outflux.net
Mon May 28 13:00:05 UTC 2007
Hi Roger,
On Mon, May 28, 2007 at 01:17:30PM +0100, Roger Leigh wrote:
> This is fantastic. I have separated it from 10mount, as 15killprocs
> (it will always get run before 10mount on shutdown). This is because
> you might want to run it even if there are no filesystems to unmount.
Ah, yes. Great idea.
> I have tweaked it slightly in a few places, but it's otherwise the
> same as your patch. This is mainly using /proc/pid/root as well as
> /proc/pid/exe (saves a grep invocation), and adding an additional log
> message. I also used signal names rather than numbers with kill (for
> portability). I also took the liberty of adding you to the AUTHORS
> file for this contribution--I hope that's acceptable to you?
I'm honored! Thanks, that's terrific. I like your changes.
> I have attached the patch I have just committed to SVN. Is this OK,
> or would you like any further changes making?
The only thing I can see to change is just a very minor performance tweak,
which is to move the exe readlink into the verbose if, just to save one
exec unless we're in verbose:
#... was here ...
+ root=$(readlink /proc/"$pid"/root || true)
+ if [ "$root" = "$1" ]; then
+ if [ "$AUTH_VERBOSITY" = "verbose" ]; then
+ exe=$(readlink /proc/"$pid"/exe || true) #<- now here
+ echo "Killing left-over pid $pid (${exe##$1})"
Thanks!
--
Kees Cook @outflux.net
More information about the Buildd-tools-devel
mailing list