mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-26 18:04:31 +01:00
train S2: merge #3804 at 7dd4185fe3 v1.92.78.0
This commit is contained in:
commit
be487a9ba2
21 files changed
+162
-26
No files matched your search
@@ -662,8 +662,8 @@ _gstack_codex_lock_acquire() {
|
||||
if [ "$_ohost" = "$_host" ] && ! kill -0 "$_pid" 2>/dev/null; then _dead=1; fi
|
||||
[ $((_now - _ts)) -ge "$_stale" ] && _dead=1
|
||||
else
|
||||
_ts=$(stat -c %Y "$_dir" 2>/dev/null || stat -f %m "$_dir" 2>/dev/null || echo 0)
|
||||
case "$_ts" in ''|*[!0-9]*) _ts=0 ;; esac
|
||||
_ts=$(stat -c %Y "$_dir" 2>/dev/null || stat -f %m "$_dir" 2>/dev/null || echo "$_now")
|
||||
case "$_ts" in ''|*[!0-9]*) _ts="$_now" ;; esac
|
||||
[ $((_now - _ts)) -ge 5 ] && _dead=1
|
||||
fi
|
||||
[ "$_dead" -eq 1 ] && _gstack_codex_lock_break "$_dir" "$_owner"
|
||||
|
||||
+1
-1
@@ -400,7 +400,7 @@ async function cmdRun(argv: string[]): Promise<number> {
|
||||
try {
|
||||
if (shell && !shell.ok) throw new Error(shell.error);
|
||||
const spawnArgv = shell?.ok ? [shell.cmd, ...shell.argv] : cmdArgv;
|
||||
proc = Bun.spawn(spawnArgv, { stdin: "inherit", stdout: "pipe", stderr: "pipe" });
|
||||
proc = Bun.spawn(spawnArgv, { stdin: "inherit", stdout: "pipe", stderr: "pipe", env: log ? { ...process.env, GSTACK_EVIDENCE_LOG: log.path } : process.env });
|
||||
} catch (e: any) {
|
||||
// Spawn failure (ENOENT on argv-direct form): record exit 127, propagate 127.
|
||||
exitCode = 127;
|
||||
|
||||
Reference in new issue
Block a user