modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-09-29 16:26:11 +04:00
parent 137e7f2d2d
commit fa1709216b
1 changed files with 20 additions and 18 deletions

View File

@ -100,27 +100,16 @@ abstract class Application {
switch ($argv[1] ?? "infos") {
case "help":
self::_info(<<<EOT
kill
release
infos
dump
reset
Valid commands:
infos
dump
reset
release
start
kill
EOT);
break;
case "start":
case "s":
array_splice($argv, 1, 1); $argc--;
return;
case "kill":
case "k":
if ($runfile->isRunning()) $runfile->wfKill();
else $ec = self::_error("not running");
break;
case "release":
case "rl":
$runfile->release();
break;
case "infos":
case "i":
$desc = $runfile->getDesc();
@ -142,6 +131,19 @@ EOT);
if (!$runfile->isRunning()) $runfile->reset();
else $ec = self::_error("cannot reset while running");
break;
case "release":
case "rl":
$runfile->release();
break;
case "start":
case "s":
array_splice($argv, 1, 1); $argc--;
return;
case "kill":
case "k":
if ($runfile->isRunning()) $runfile->wfKill();
else $ec = self::_error("not running");
break;
default:
$ec = self::_error("$argv[1]: unexpected command", app2::EC_BAD_COMMAND);
}