repo.or.cz
/
cmdllinux.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
instpkg cleanup
[cmdllinux.git]
/
scripts
/
_killall.sh
blob
e0d91234575532cf08f78f2680c6d252e5990e15
1
LPPID
=
`ps -o ppid= -p $$`
2
LPPID
=
${LPPID// /}
3
PLPPID
=
`ps -o ppid= -p
$LPPID
`
4
PLPPID
=
${PLPPID// /}
5
6
for
i
in
/
proc
/[
0
-9
]*/
exe
;
do
7
if
LNK
=
$
(
readlink
$i
2
> /
dev
/
null
);
then
8
A
=
${i%/exe}
9
B
=
${A##*/}
10
[
$B
!=
1
-a
$B
!=
$$
-a
$B
!=
$LPPID
-a
$B
!=
$PLPPID
] &&
kill
$B
11
fi
12
done