Skip to content

Instantly share code, notes, and snippets.

@octocat
Created August 25, 2011 02:43
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save octocat/1169852 to your computer and use it in GitHub Desktop.
Save octocat/1169852 to your computer and use it in GitHub Desktop.
require("./rx");
var child_process = require("child_process");
for (var k in child_process) {
exports[k] = child_process[k];
}
exports.exec = function (command, options) {
var subject = new Rx.AsyncSubject();
var handler = function (err, stdout, stderr) {
if (err !== null) {
subject.OnError(err);
} else {
subject.OnNext({ stdout: stdout, stderr: stderr });
subject.OnCompleted();
}
};
child_process.exec(command, options, handler);
return subject;
};
@R2D221
Copy link

R2D221 commented Dec 19, 2014

I may not be an expert, but isn't this Javascript instead of C#?

@slvnperron
Copy link

Yes, it is. (nodejs)

@codemilli
Copy link

@R2D221 CS might mean the CoffeeScript, I think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment