From 3fca8ca130cbca69c1159636736997019ee36f83 Mon Sep 17 00:00:00 2001 From: Yingchi Long Date: Thu, 1 May 2025 17:18:07 +0800 Subject: [PATCH] bin/cpubench: don't wrap inside systemd-run --- src/bin/cpubench.ts | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/bin/cpubench.ts b/src/bin/cpubench.ts index a07c2d4..ddb772d 100644 --- a/src/bin/cpubench.ts +++ b/src/bin/cpubench.ts @@ -60,28 +60,18 @@ const configFile = path.resolve(cpubenchDir, 'config', `rendered-${uuid}.config` writeFileSync(configFile, cpubenchConfig); -const systemdArgs = [ - '--user', - `--unit=${uuid}`, - `--working-directory=${cpubenchDir}`, - path.resolve(cpubenchDir, 'cpubench.sh'), - `--config=${configFile}`, - "--skip_verify=1", - "--rebuild=1", - "-i=1" -]; - const proc = spawn( - 'systemd-run', - systemdArgs, + path.resolve(cpubenchDir, 'cpubench.sh'), + [ + `--config=${configFile}`, + "--skip_verify=1", + "--rebuild=1", + "-i=1" + ], { cwd: cpubenchDir } ); proc.stdout.pipe(process.stdout); proc.stderr.pipe(process.stderr); -console.log(`Command suggest:`); -console.log(chalk.green(`systemctl --user status ${uuid}`)); -console.log(chalk.green(`journalctl --user -xeu ${uuid}`)); - -await promisifySpawn(proc); \ No newline at end of file +await promisifySpawn(proc);