Skip to content

Commit 74a7d00

Browse files
committed
run-tests: Don't die unnecessarily
die/exit leak memory, don't use them if we don't need to.
1 parent 1d534b9 commit 74a7d00

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

run-tests.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function main()
6363
if (getenv("TEST_PHP_WORKER")) {
6464
$workerID = intval(getenv("TEST_PHP_WORKER"));
6565
run_worker();
66-
die;
66+
return;
6767
}
6868

6969
define('INIT_DIR', getcwd());
@@ -733,7 +733,7 @@ function main()
733733
exit(1);
734734
}
735735

736-
exit(0);
736+
return;
737737
}
738738
}
739739

@@ -1731,11 +1731,9 @@ function run_worker() {
17311731
"type" => "error",
17321732
"msg" => "Unrecognised message type: $command[type]"
17331733
]);
1734-
die;
1734+
break 2;
17351735
}
17361736
}
1737-
1738-
die;
17391737
}
17401738

17411739
//

0 commit comments

Comments
 (0)