You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
This code below causes a segfault when receiving SIGINT or control-c on the command line instead terminating gracefully.
In the first file.
"use strict";
var os = require('os');
var http = require('http');
var cluster = require('cluster');
var createServer = function createServer(opts) {
var server = {};
if (cluster.isMaster) {
var cpuCount = require('os').cpus().length;
for (var i = 0; i < cpuCount; i += 1) {
cluster.fork();
}
return server;
} else {
http.Server(function(req, res) {
res.writeHead(200);
res.end("This answer comes from the process " + process.pid);
}).listen(8080);
}
}
module.exports = {
createServer: createServer,
};
And the second file.
"use strict";
var router = require('./prac.js');
var server = router.createServer();
Running node on the second file and typing control-c should reproduce the segfault.
@2trill2spill Thanks 👍 This seems like a duplicate of #9326, which has been fixed in node v0.12.3. Can you please confirm that upgrading to node v0.12.3 or later fixes this issue?
In the meantime, closing as a duplicate of #9326 but please let us know if upgrading actually fixes your problem.
This code below causes a segfault when receiving SIGINT or control-c on the command line instead terminating gracefully.
In the first file.
And the second file.
Running node on the second file and typing control-c should reproduce the segfault.
Here is a link to the core dump: https://mega.co.nz/#!ZEtgmQ7I!ZbLPAve6G6i4evnN2jnHTcVsTDNbTTvax0gqGFCqzKw
Here is some output from valgrind: https://mega.co.nz/#!9dUCyYRa!LrFTHCzQoiUzfrCmeqbRo43UnAuBEFVkipio9uaoi9Q
The text was updated successfully, but these errors were encountered: