Skip to content

Instantly share code, notes, and snippets.

View afelix's full-sized avatar

Sergey Kryzhanovsky afelix

View GitHub Profile
@afelix
afelix / mjoetmp
Created September 14, 2010 10:55
var opts = getopts(process.argv.slice(2, process.argv.length), ['-v'], ['-c']),
verbose = opts.single.indexOf('-v') != -1,
watchedDir = require('path').dirname(opts.pairs['-c']),
config = require(watchedDir + '/.mjoe').config,
fs = require('fs'),
log = require('sys').log,
exec = require('child_process').exec,
print = require('sys').print,
jobsByEvent = { '+' : {}, '*' : {}, '-' : {} }, // технически более оптимальная структура конфига
activeJobsByKey = {}, // активные процессы
echo $(narwhal extrabytes.js)
diff --git a/lib/child_process.js b/lib/child_process.js
index b881150..3996c95 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -10,24 +10,26 @@ var spawn = exports.spawn = function (path, args, env, customFds) {
return child;
};
-exports.exec = function (command /*, options, callback */) {