Lines 665-672
Link Here
|
665 |
# sometimes enough to miss all the sandbox action completely. Better to |
665 |
# sometimes enough to miss all the sandbox action completely. Better to |
666 |
# not check for sanity and have users check their FEATURES instead. |
666 |
# not check for sanity and have users check their FEATURES instead. |
667 |
my @targets = (); |
667 |
my @targets = (); |
668 |
my @sandbox_pids = qx{ps --no-header -o pid -C sandbox}; |
668 |
my @sandbox_pids = (); |
|
|
669 |
my @sandbox_procs = qx{ps ax -o pid,args | tail -n +2 | sed -e's/^ *//' | grep ' sandbox ' | grep -v ' grep '}; |
669 |
my ($e_curmerge, $e_lastmerge); |
670 |
my ($e_curmerge, $e_lastmerge); |
|
|
671 |
foreach (@sandbox_procs) |
672 |
{ |
673 |
if (m/^(.*?) \[(.*?)\-[0-9].*?\]/) |
674 |
{ |
675 |
push @sandbox_pids, $1; |
676 |
push @targets, $2; |
677 |
} |
678 |
} |
670 |
if (scalar @sandbox_pids == 0) |
679 |
if (scalar @sandbox_pids == 0) |
671 |
{ |
680 |
{ |
672 |
print colored("!!!", $COLORS{'red'}); |
681 |
print colored("!!!", $COLORS{'red'}); |
Lines 674-694
Link Here
|
674 |
print "(the -c option only works if there is" . " an ongoing compilation, see manpage)\n"; |
683 |
print "(the -c option only works if there is" . " an ongoing compilation, see manpage)\n"; |
675 |
exit; |
684 |
exit; |
676 |
} |
685 |
} |
677 |
foreach my $pid (@sandbox_pids) |
|
|
678 |
{ |
679 |
my $current; |
680 |
chomp $pid; |
681 |
$pid =~ s/\s//g; |
682 |
open(my $cmdline, "/proc/$pid/cmdline"); |
683 |
while (<$cmdline>) |
684 |
{ |
685 |
if ($_ =~ m/^\[(.*?)\-[0-9].*?\]/g) |
686 |
{ |
687 |
$current = $1; |
688 |
} |
689 |
} |
690 |
push @targets, $current; |
691 |
} |
692 |
if (scalar @targets == 0) |
686 |
if (scalar @targets == 0) |
693 |
{ |
687 |
{ |
694 |
print colored("!!!", $COLORS{'red'}); |
688 |
print colored("!!!", $COLORS{'red'}); |