]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
filter_chroot, exit early if no pids
authorElan Ruusamäe <glen@delfi.ee>
Mon, 18 May 2015 13:46:05 +0000 (16:46 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 18 May 2015 13:46:06 +0000 (16:46 +0300)
this is optimization to lessen noise when debugging, not performance
optimize

lib/functions

index 5d6dfbdd61c6a627ea22d76c325d88d2cb757f35..f337e82f1fef21d6a52d41042321ec9f175e9725 100644 (file)
@@ -498,6 +498,9 @@ checkpid() {
 # (note: some processes like named are chrooted but run outside chroot)
 # - do nothing inside vserver
 filter_chroot() {
+       # no pids, exit early
+       [ $# -eq 0 ] && return
+
        # filter by pid namespace if such dir exists for current process
        # we do filter in containers as stacked containers are possible with LXC
        if [ -d /proc/$$/ns ]; then
This page took 0.290644 seconds and 4 git commands to generate.