<commit_before>var engine = require('../engine').engine;

console.log(process.argv);

var cylinder_id = process.argv[2];
var console_endpoint = process.argv[3];

// This is a service that responds to requests
var piston = engine.piston.create({
    listening_endpoint: "ipc:///tmp/"+cylinder_id+".ipc",
    cylinder_id: cylinder_id,
    console_endpoint: console_endpoint
});

process.on('SIGTERM', function(){
    console.log("closing piston");
    piston.close();
});<commit_msg>If the Piston encounters an uncaughtException then log to stderr and exit with code 2<commit_after>var engine = require('../engine').engine;

console.log(process.argv);

var cylinder_id = process.argv[2];
var console_endpoint = process.argv[3];

// This is a service that responds to requests
var piston = engine.piston.create({
    listening_endpoint: "ipc:///tmp/"+cylinder_id+".ipc",
    cylinder_id: cylinder_id,
    console_endpoint: console_endpoint
});

process.on('SIGTERM', function(){
    console.log("closing piston");
    piston.close();
});

process.on("uncaughtException", function(err){
  console.error(err);
  process.exit(2);
});
{'fraction_non_alphanumeric': 0.15173025732031944, 'fraction_numerical': 0.005323868677905945, 'mean_word_length': 4.875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1826024', 'n_tokens_mistral': 370, 'n_tokens_neox': 356, 'n_words': 82}