惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
J
Java Code Geeks
罗磊的独立博客
雷峰网
雷峰网
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
B
Blog RSS Feed
腾讯CDC
Apple Machine Learning Research
Apple Machine Learning Research
D
Docker
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Vercel News
Vercel News
小众软件
小众软件
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
I
InfoQ
S
SegmentFault 最新的问题

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(e2e): preserve rpc timeout kill grace · openclaw/open...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -325,6 +325,7 @@ export function runCommand(command, args, options = {}) {

325325

let stderr = { text: "", truncatedChars: 0 };

326326

let timedOut = false;

327327

let forceKillTimer;

328+

let forceKillAt;

328329

let sampleTimer;

329330

let resourceSampleInFlight = null;

330331

let capturedResourceSampleCount = 0;

@@ -378,6 +379,7 @@ export function runCommand(command, args, options = {}) {

378379

const timer = setTimeout(() => {

379380

timedOut = true;

380381

signalProcessGroup(child, "SIGTERM");

382+

forceKillAt = Date.now() + timeoutKillGraceMs;

381383

forceKillTimer = setTimeout(() => signalProcessGroup(child, "SIGKILL"), timeoutKillGraceMs);

382384

forceKillTimer.unref();

383385

}, timeoutMs);

@@ -390,6 +392,7 @@ export function runCommand(command, args, options = {}) {

390392

child.on("error", (error) => {

391393

clearTimeout(timer);

392394

clearTimeout(forceKillTimer);

395+

forceKillAt = undefined;

393396

void stopResourceSampling().finally(() =>

394397

reject(toLintErrorObject(error, "Command failed before exit")),

395398

);

@@ -398,6 +401,7 @@ export function runCommand(command, args, options = {}) {

398401

clearTimeout(timer);

399402

const finish = () => {

400403

clearTimeout(forceKillTimer);

404+

forceKillAt = undefined;

401405

void stopResourceSampling().then((resourceSampleFailure) => {

402406

if (!timedOut && status === 0) {

403407

if (resourceSampleFailure) {

@@ -439,7 +443,10 @@ export function runCommand(command, args, options = {}) {

439443

};

440444441445

if (timedOut) {

442-

void finishTimedOutCommandProcessTree(child, timeoutKillGraceMs).then(finish, finish);

446+

void finishTimedOutCommandProcessTree(child, {

447+

forceKillAt,

448+

timeoutKillGraceMs,

449+

}).then(finish, finish);

443450

return;

444451

}

445452

@@ -448,11 +455,18 @@ export function runCommand(command, args, options = {}) {

448455

});

449456

}

450457451-

async function finishTimedOutCommandProcessTree(child, timeoutKillGraceMs) {

458+

async function finishTimedOutCommandProcessTree(child, { forceKillAt, timeoutKillGraceMs }) {

452459

if (!commandProcessTreeIsAlive(child)) {

453460

return;

454461

}

455-

signalProcessGroup(child, "SIGKILL");

462+

const graceRemainingMs =

463+

forceKillAt === undefined ? timeoutKillGraceMs : Math.max(0, forceKillAt - Date.now());

464+

if (graceRemainingMs > 0) {

465+

await waitForCommandProcessTreeExit(child, graceRemainingMs);

466+

}

467+

if (commandProcessTreeIsAlive(child)) {

468+

signalProcessGroup(child, "SIGKILL");

469+

}

456470

await waitForCommandProcessTreeExit(child, timeoutKillGraceMs);

457471

}

458472