From 9d7aeb229f2e4042723c8f11e0eaa7512d214276 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 3 Aug 2008 06:57:27 +0000 Subject: Kill running daemons using kill -f on Windows (cygwin) which kills by Windows PID. --- infrastructure/makebuildenv.pl.in | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'infrastructure/makebuildenv.pl.in') diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in index 3b15170b..52e90b50 100755 --- a/infrastructure/makebuildenv.pl.in +++ b/infrastructure/makebuildenv.pl.in @@ -408,13 +408,27 @@ for my $mod (@implicit_deps, @modules) "test script file for $module for writing\n"; print TESTFILE "#!/bin/sh\necho TEST: $module\n"; - if(-d "$module/testfiles") + if (-d "$module/testfiles") + { + if ($target_windows) + { + print TESTFILE <<__E; +echo Killing any running daemons... +test -r testfiles/bbackupd.pid && /bin/kill -f `cat testfiles/bbackupd.pid` +test -r testfiles/bbstored.pid && /bin/kill -f `cat testfiles/bbstored.pid` +__E + } + else { print TESTFILE <<__E; echo Killing any running daemons... test -r testfiles/bbackupd.pid && kill `cat testfiles/bbackupd.pid` test -r testfiles/bbstored.pid && kill `cat testfiles/bbstored.pid` +__E + } + + print TESTFILE <<__E; echo Removing old test files... chmod -R a+rwx testfiles rm -rf testfiles -- cgit v1.2.3