温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/reference/node/child_process/ChildProcess/ref
点击访问原文链接

ChildProcess.ref method | Node.js child_process module | Bun

ChildProcess.ref method | Node.js child_process module | BunBuildDocsReferenceGuidesBlogDiscord/node:child_process/ChildProcess/refMref

Search the reference...

/

BuildDocsReferenceGuidesBlogDiscord/node:child_process/ChildProcess/refMref

method

child_process.ChildProcess.refref(): void;Calling subprocess.ref() after making a call to subprocess.unref() will restore the removed reference count for the child process, forcing the parent to wait for the child to exit before exiting itself.

import { spawn } from 'node:child_process'; const subprocess = spawn(process.argv[0], ['child_program.js'], { detached: true, stdio: 'ignore', }); subprocess.unref(); subprocess.ref();

Resources

ReferenceDocsGuidesDiscordMerch StoreGitHubBlog 

Toolkit

RuntimePackage managerTest runnerBundlerPackage runner

Project

Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco

We're hiring →

智能索引记录