--- genlop-0.30.7/genlop.old 2007-04-09 08:55:46 -0600 +++ genlop-0.30.7/genlop 2007-09-19 15:47:02 -0600 @@ -665,8 +665,17 @@ # sometimes enough to miss all the sandbox action completely. Better to # not check for sanity and have users check their FEATURES instead. my @targets = (); - my @sandbox_pids = qx{ps --no-header -o pid -C sandbox}; + my @sandbox_pids = (); + my @sandbox_procs = qx{ps ax -o pid,args | tail -n +2 | sed -e's/^ *//' | grep ' sandbox ' | grep -v ' grep '}; my ($e_curmerge, $e_lastmerge); + foreach (@sandbox_procs) + { + if (m/^(.*?) \[(.*?)\-[0-9].*?\]/) + { + push @sandbox_pids, $1; + push @targets, $2; + } + } if (scalar @sandbox_pids == 0) { print colored("!!!", $COLORS{'red'}); @@ -674,21 +683,6 @@ print "(the -c option only works if there is" . " an ongoing compilation, see manpage)\n"; exit; } - foreach my $pid (@sandbox_pids) - { - my $current; - chomp $pid; - $pid =~ s/\s//g; - open(my $cmdline, "/proc/$pid/cmdline"); - while (<$cmdline>) - { - if ($_ =~ m/^\[(.*?)\-[0-9].*?\]/g) - { - $current = $1; - } - } - push @targets, $current; - } if (scalar @targets == 0) { print colored("!!!", $COLORS{'red'});