summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-06-22 08:34:46 +0000
committerdes <des@FreeBSD.org>2004-06-22 08:34:46 +0000
commitcb556a8fce0705cc0ce7bde7e95bd57972dcdc52 (patch)
tree19cb3ca6671d943e44f5efb361a53445efce0a5b /tools
parentd0a100c886c49e92b8f7cb9a01d3c3e3ff5c1a10 (diff)
downloadFreeBSD-src-cb556a8fce0705cc0ce7bde7e95bd57972dcdc52.zip
FreeBSD-src-cb556a8fce0705cc0ce7bde7e95bd57972dcdc52.tar.gz
Set up logging before trying to lock the sandbox; otherwise tbmaster(1)
will just log a mysterious "tinderbox returned exit code 35".
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/tinderbox/tinderbox.pl30
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/tools/tinderbox/tinderbox.pl b/tools/tools/tinderbox/tinderbox.pl
index 96214c8..686e325 100644
--- a/tools/tools/tinderbox/tinderbox.pl
+++ b/tools/tools/tinderbox/tinderbox.pl
@@ -378,21 +378,6 @@ MAIN:{
$cmds{$cmd} = 1;
}
- # Take control of our sandbox
- if ($sandbox !~ m|^(/[\w./-]+)$|) {
- error("invalid sandbox directory");
- }
- $sandbox = "$1/$branch/$arch/$machine";
- $ENV{'HOME'} = $sandbox;
- make_dir($sandbox)
- or error("$sandbox: $!");
- my $lockfile = open_locked("$sandbox/lock", O_RDWR|O_CREAT);
- if (!defined($lockfile)) {
- error("unable to lock sandbox");
- }
- truncate($lockfile, 0);
- print($lockfile "$$\n");
-
# Open logfile
open(STDIN, '<', "/dev/null")
or error("/dev/null: $!\n");
@@ -412,6 +397,21 @@ MAIN:{
$SIG{__DIE__} = \&sigdie;
$SIG{__WARN__} = \&sigwarn;
+ # Take control of our sandbox
+ if ($sandbox !~ m|^(/[\w./-]+)$|) {
+ error("invalid sandbox directory");
+ }
+ $sandbox = "$1/$branch/$arch/$machine";
+ $ENV{'HOME'} = $sandbox;
+ make_dir($sandbox)
+ or error("$sandbox: $!");
+ my $lockfile = open_locked("$sandbox/lock", O_RDWR|O_CREAT);
+ if (!defined($lockfile)) {
+ error("unable to lock sandbox");
+ }
+ truncate($lockfile, 0);
+ print($lockfile "$$\n");
+
# Clean up remains from old runs
if ($cmds{'clean'}) {
logstage("cleaning the sandbox");
OpenPOWER on IntegriCloud