René's URL Explorer Experiment


Title: Know when a process ended due to the `child_process.spawn()` `timeout` option · Issue #51561 · nodejs/node · GitHub

Open Graph Title: Know when a process ended due to the `child_process.spawn()` `timeout` option · Issue #51561 · nodejs/node

X Title: Know when a process ended due to the `child_process.spawn()` `timeout` option · Issue #51561 · nodejs/node

Description: What is the problem this feature will solve? When a process ends due to the timeout option of child_process.spawn(), there is no way to know whether that termination was due to the timeout. A SIGTERM is sent to the process, but that's pr...

Open Graph Description: What is the problem this feature will solve? When a process ends due to the timeout option of child_process.spawn(), there is no way to know whether that termination was due to the timeout. A SIGTE...

X Description: What is the problem this feature will solve? When a process ends due to the timeout option of child_process.spawn(), there is no way to know whether that termination was due to the timeout. A SIGTE...

Opengraph URL: https://github.com/nodejs/node/issues/51561

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Know when a process ended due to the `child_process.spawn()` `timeout` option ","articleBody":"### What is the problem this feature will solve?\r\n\r\nWhen a process ends due to the `timeout` option of `child_process.spawn()`, there is no way to know whether that termination was due to the timeout. A `SIGTERM` is sent to the process, but that's pretty much it.\r\n\r\n```js\r\nimport {spawn} from 'node:child_process'\r\n\r\nconst childProcess = spawn('node', ['-e', 'setTimeout(() => {}, 1e7)'], {\r\n  timeout: 2e3, \r\n  stdio: 'inherit', // no stdout/stderr\r\n})\r\nchildProcess.on('exit', (exitCode, signal) => {\r\n  console.log({exitCode, signal}) // { exitCode: null, signal: 'SIGTERM' }\r\n})\r\n```\r\n\r\nThis makes debugging harder. Some users might be left wondering why the process ended if they don't pay attention to the `timeout` option.\r\n\r\n### What is the feature you are proposing to solve the problem?\r\n\r\nHaving a way to know whether the process ended due to the `timeout` option. Any implementation would work. Some potential ideas:\r\n  - `timeout` event on `childProcess`\r\n  - third boolean argument `timedOut` passed to the `exit` event\r\n  - emit an `error` event with `error.code: 'ETIMEDOUT'` on `childProcess`. This is a breaking change since many users are currently listening for `error` events, so would probably not be a good idea.\r\n  - `childProcess.timedOut = true`\r\n  - `childProcess.timedOut()` returning a boolean\r\n\r\n### What alternatives have you considered?\r\n\r\nOne could possibly set a manual timeout like the following.\r\n\r\n```js\r\nlet timedOut = false\r\nsetTimeout(() => {\r\n  timedOut = true\r\n}, 2e3)\r\n```\r\n\r\nHowever, it defeats some of the convenience of the `timeout` option, since that one might as well call `childProcess.kill()` themselves then. Also, it is slightly unreliable since an unrelated `SIGTERM` could theoretically have been sent at the exact same time.","author":{"url":"https://github.com/ehmicky","@type":"Person","name":"ehmicky"},"datePublished":"2024-01-24T21:05:48Z","url":"https://github.com/nodejs/node/issues/51561"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1331d5a9-555c-7c26-7136-f441efef00fd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC3CE:169E62:91A26B:BD0A97:6AED38EA
html-safe-nonce3b08ccded6542356b6fc5f069420d1fd1aed3acbe0c5f599f6b0dad0e5ee4e07
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0NFOjE2OUU2Mjo5MUEyNkI6QkQwQTk3OjZBRUQzOEVBIiwidmlzaXRvcl9pZCI6IjQxOTc1ODU3MDg5OTUzOTM3NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc844ba254390a105c2230fe14a676d3ce7389e8dfe237ef22e3ff885b31a4fe1
hovercard-subject-tagissue:2099105948
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/51561/issue_layout
twitter:imagehttps://opengraph.githubassets.com/162bfd1e93477c041518dadeb409c3499b3210ca74796f144839c47d7163fbf1/nodejs/node/issues/51561
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/162bfd1e93477c041518dadeb409c3499b3210ca74796f144839c47d7163fbf1/nodejs/node/issues/51561
og:image:altWhat is the problem this feature will solve? When a process ends due to the timeout option of child_process.spawn(), there is no way to know whether that termination was due to the timeout. A SIGTE...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameehmicky
hostnamegithub.com
expected-hostnamegithub.com
None26c92a9388ddfad3fa88d132b5d5f0b4747030233dcc4e5efb05f1cbae152184
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec629ad99c254d306375fc8354d04321c2c362236
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/51561#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F51561
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F51561
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/51561
Reloadhttps://github.com/nodejs/node/issues/51561
Reloadhttps://github.com/nodejs/node/issues/51561
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)https://github.com/nodejs/node/issues
Pull requests665 (665)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/51561
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/51561
#66639https://github.com/nodejs/node/pull/66639
Know when a process ended due to the child_process.spawn() timeout option https://github.com/nodejs/node/issues/51561#top
#66639https://github.com/nodejs/node/pull/66639
child_processIssues and PRs related to the child_process subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22child_process%22
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
https://github.com/ehmicky
ehmickyhttps://github.com/ehmicky
on Jan 24, 2024https://github.com/nodejs/node/issues/51561#issue-2099105948
Nexthttps://github.com/nodejs/node/issues/51561?timeline_page=1
ehmickyhttps://github.com/ehmicky
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
on Jan 24, 2024https://github.com/nodejs/node/issues/51561#event-11589605620
github-project-automationhttps://github.com/apps/github-project-automation
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Jan 24, 2024https://github.com/nodejs/node/issues/51561#event-14891690164
github-project-automationhttps://github.com/apps/github-project-automation
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
on Jan 24, 2024https://github.com/nodejs/node/issues/51561
https://github.com/aduh95
aduh95https://github.com/aduh95
on Jan 25, 2024https://github.com/nodejs/node/issues/51561#issuecomment-1910769280
VoltrexKeyvahttps://github.com/VoltrexKeyva
child_processIssues and PRs related to the child_process subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22child_process%22
on Jan 28, 2024https://github.com/nodejs/node/issues/51561#event-11618999972
https://github.com/FranciscoMateusVG
FranciscoMateusVGhttps://github.com/FranciscoMateusVG
on Jan 30, 2024https://github.com/nodejs/node/issues/51561#issuecomment-1917655716
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jul 29, 2024https://github.com/nodejs/node/issues/51561#issuecomment-2254771743
GitHub Actionshttps://help.github.com/en/actions
never-stalehttps://github.com/nodejs/node/labels/never-stale
feature request management documenthttps://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jul 29, 2024https://github.com/nodejs/node/issues/51561#event-13672927073
https://github.com/ehmicky
ehmickyhttps://github.com/ehmicky
on Jul 29, 2024https://github.com/nodejs/node/issues/51561#issuecomment-2254857834
#51608https://github.com/nodejs/node/pull/51608
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jul 30, 2024https://github.com/nodejs/node/issues/51561#event-13688605329
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jan 26, 2025https://github.com/nodejs/node/issues/51561#issuecomment-2614163549
GitHub Actionshttps://help.github.com/en/actions
never-stalehttps://github.com/nodejs/node/labels/never-stale
feature request management documenthttps://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jan 26, 2025https://github.com/nodejs/node/issues/51561#event-16068616856
https://github.com/sindresorhus
sindresorhushttps://github.com/sindresorhus
on Jan 26, 2025https://github.com/nodejs/node/issues/51561#issuecomment-2614181626
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jan 27, 2025https://github.com/nodejs/node/issues/51561#event-16071694724
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jul 26, 2025https://github.com/nodejs/node/issues/51561#issuecomment-3120925088
GitHub Actionshttps://help.github.com/en/actions
never-stalehttps://github.com/nodejs/node/labels/never-stale
feature request management documenthttps://github.com/nodejs/node/blob/HEAD/doc/contributing/feature-request-management.md
https://github.com/FranciscoMateusVG
FranciscoMateusVGhttps://github.com/FranciscoMateusVG
on Jan 23, 2026https://github.com/nodejs/node/issues/51561#issuecomment-3787751939
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jan 24, 2026https://github.com/nodejs/node/issues/51561#event-22256411525
FranciscoMateusVGhttps://github.com/FranciscoMateusVG
on Feb 9, 2026https://github.com/nodejs/node/issues/51561#event-22629871105
doc: add API docs for subprocess.timedOut propertyhttps://github.com/FranciscoMateusVG/node/commit/2e3cb97b470dc7b88a71b2a43d1a9f5754c2401e
2e3cb97https://github.com/FranciscoMateusVG/node/commit/2e3cb97b470dc7b88a71b2a43d1a9f5754c2401e
https://github.com/FranciscoMateusVG
FranciscoMateusVGhttps://github.com/FranciscoMateusVG
on Mar 2, 2026https://github.com/nodejs/node/issues/51561#issuecomment-3981588571
Rejnyxhttps://github.com/Rejnyx
on May 7, 2026https://github.com/nodejs/node/issues/51561#event-25258273380
feat(tests): Tier 4 — hook contract (block-destructive + 5 critical h…https://github.com/Rejnyx/cortex-x/commit/2766fce3241e902f3d23c2fb13e0997f2f3683ae
2766fcehttps://github.com/Rejnyx/cortex-x/commit/2766fce3241e902f3d23c2fb13e0997f2f3683ae
feat(tests): Tier 4 — hook contract (block-destructive + 5 critical h…https://github.com/Rejnyx/cortex-x/commit/02fc6b46870fce13fd0fc5ef77f9cbf182b84572
02fc6b4https://github.com/Rejnyx/cortex-x/commit/02fc6b46870fce13fd0fc5ef77f9cbf182b84572
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jul 20, 2026https://github.com/nodejs/node/issues/51561#issuecomment-5019632575
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jul 20, 2026https://github.com/nodejs/node/issues/51561#event-28198623398
https://github.com/sindresorhus
sindresorhushttps://github.com/sindresorhus
on Jul 20, 2026https://github.com/nodejs/node/issues/51561#issuecomment-5020036867
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jul 21, 2026https://github.com/nodejs/node/issues/51561#event-28243851705
https://github.com/Curis-lab
Curis-labhttps://github.com/Curis-lab
on Aug 7, 2026https://github.com/nodejs/node/issues/51561#issuecomment-5210372419
https://github.com/Curis-lab
Curis-labhttps://github.com/Curis-lab
on Aug 14, 2026https://github.com/nodejs/node/issues/51561#issuecomment-5288200750
https://github.com/Curis-lab
Curis-labhttps://github.com/Curis-lab
on Aug 15, 2026https://github.com/nodejs/node/issues/51561#issuecomment-5300102212
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#66639https://github.com/nodejs/node/pull/66639
on Oct 29, 2026https://github.com/nodejs/node/issues/51561#event-34565324962
nodejs-github-bothttps://github.com/nodejs-github-bot
on Oct 29, 2026https://github.com/nodejs/node/issues/51561#event-34565325705
child_process: add subprocess.timedOuthttps://github.com/nodejs/node/commit/c2591daac54c0a7744751031caa4eca04c4233d3
c2591dahttps://github.com/nodejs/node/commit/c2591daac54c0a7744751031caa4eca04c4233d3
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/51561
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/51561
child_processIssues and PRs related to the child_process subsystem.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22child_process%22
feature requestIssues requesting new Node.js features.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22feature%20request%22
Node.js feature requestshttps://github.com/orgs/nodejs/projects/4
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.