Skip to content

Commit

Permalink
cherry-pick zombies hotfix from 1.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rafapaezbas committed Dec 3, 2024
1 parent b03b654 commit b2c424e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/crasher.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const { isBare, platform, arch } = require('which-runtime')
const fs = isBare ? require('bare-fs') : require('fs')
const path = isBare ? require('bare-path') : require('path')
const checkout = require('../checkout')
const os = isBare ? require('bare-os') : require('os')

let hasLogged = false
const start = Date.now()
Expand All @@ -25,7 +26,11 @@ function logCrashAndExit (logPath, errorInfo, checkout, stackTrace, err) {

console.error(`Error logged at ${logPath}`)

runContext.exit(1)
if (isBare) {
os.kill(pid)
} else {
runContext.exit(1)
}
}

function setupCrashHandlers (processName, swap) {
Expand Down

0 comments on commit b2c424e

Please sign in to comment.