Add a processing timeout. Set to 200ms for now; we'll see how that goes

diffs
Matt Godbolt 11 years ago
parent 358438e244
commit 63e9fef856

@ -102,9 +102,14 @@ function compile(req, res) {
);
var stdout = "";
var stderr = "";
var timeout = setTimeout(function() {
child.kill();
stderr += "\nKilled - processing time exceeded";
}, props.get("gcc-explorer", "compileTimeoutMs", 100));
child.stdout.on('data', function (data) { stdout += data; });
child.stderr.on('data', function (data) { stderr += data; });
child.on('exit', function (code) {
clearTimeout(timeout);
child_process.exec('cat "' + outputFilename + '" | c++filt', function(err, filt_stdout, filt_stderr) {
var data = filt_stdout;
if (err) {

@ -1,2 +1,3 @@
port=10240
compileTimeoutMs=200
compilers=/usr/bin/g++-4.4:/usr/bin/g++-4.5:/usr/bin/g++-4.6:/usr/bin/arm-linux-gnueabi-g++-4.5

Loading…
Cancel
Save