Created
August 5, 2022 03:22
-
-
Save firxworx/8555597d9ccc93c115b5cdf7c727b6ac to your computer and use it in GitHub Desktop.
Revisions
-
firxworx created this gist
Aug 5, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ from: <https://github.com/prisma/prisma/issues/2917> > The reason Prisma is cleaning up its child processes, is we'll end up with a dangling child process. So unfortunately Node.js does not make sure, that the child process is killed properly. That's why Prisma Client is cleaning this up, for now, to not introduce a foot gun for Prisma users. index.js ```ts const { spawn } = require('child_process') const path = require('path') const child = spawn('node', [path.join(__dirname, 'run.js')], { stdio: 'inherit', }) setTimeout(() => { process.exit() }, 100) ``` run.js ```ts console.log('hao', process.pid) setTimeout(() => { console.log('hi') }, 100000000) ```