Prechádzať zdrojové kódy

$! doesn't worked on the first try somehow, now it does and its
(a lot) cleaner than using this ps "magic" as this fails now and then…

David Kalnischkies 15 rokov pred
rodič
commit
0dc05bf095
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      test/integration/framework

+ 1 - 1
test/integration/framework

@@ -445,7 +445,7 @@ signreleasefiles() {
 changetowebserver() {
 changetowebserver() {
 	if which weborf > /dev/null; then
 	if which weborf > /dev/null; then
 		weborf -xb aptarchive/ 2>&1 > /dev/null &
 		weborf -xb aptarchive/ 2>&1 > /dev/null &
-		CURRENTTRAP="kill $(ps | grep weborf | sed -e 's#^[ ]*##' | cut -d' ' -f 1); $CURRENTTRAP"
+		CURRENTTRAP="kill $!; $CURRENTTRAP"
 		trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
 		trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
 		local APTARCHIVE="file://$(readlink -f ./aptarchive)"
 		local APTARCHIVE="file://$(readlink -f ./aptarchive)"
 		for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do
 		for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do