Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidecar zombie hotfix #463

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Pear Runtime Changelog

## v1.6.2

### Fixes

* Internal - Fix process termination after unhandled error in sidecar

## v1.6.1

### Fixes

* Linux - Updated sodium-native to version 4.3.1

## v1.6.0

### Features
Expand Down
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pear",
"version": "1.6.1",
"version": "1.6.2",
"main": "./boot.js",
"private": true,
"scripts": {
Expand Down