This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: reset signal handler to SIG_DFL on FreeBSD
FreeBSD has a nasty bug with SA_RESETHAND reseting the SA_SIGINFO, that is in turn set for a libthr wrapper. This leads to a crash. Work around the issue by manually setting SIG_DFL in the signal handler. Fix: #9326 PR-URL: nodejs/node#1218 Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var assert = require('assert'); | ||
var child_process = require('child_process'); | ||
|
||
// NOTE: Was crashing on FreeBSD | ||
var cp = child_process.spawn(process.execPath, [ | ||
'-e', | ||
'process.kill(process.pid, "SIGINT")' | ||
]); | ||
|
||
cp.on('exit', function(code) { | ||
assert.notEqual(code, 0); | ||
}); |