Open AtkinsSJ opened 6 months ago
The EMFILE error might have been caused by some of my local changes, but the webpack issue isn't.
I was worried this might happen. I actually have no idea how to make sure child processes actually exit in node - maybe it can't be done? Maybe we need to record PIDs and invoke the kill
command on the exit handler? I'm adding the "help wanted" label to this.
It looks like this might be specific to UNIX with using spawn
and shell:true
.
Adding detached: true
in spawn
and using process.kill(-proc.pid)
seems to work, but I'm not entirely sure if this alters some behavior that we don't want.
Here's something related I found. Issue #46865 in Node.
Added need-reprod
label as I have not ever reproduced this issue
Noticed this initially when I started getting a whole bunch of errors like this when running
npm start
:I'd been repeatedly starting puter, then stopping it with Ctrl-C, to test some changes I was making.
Sure enough, looking at the process monitor, I had a lot of
webpack
processes still around from previousnpm start
s. It seems that however they are spawned, they don't die with the parent process.