Files
test-repo/tests/format/flow-repo/node_tests/child_process/exec.js
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
308 B
JavaScript
Raw Normal View History

2016-12-23 19:31:38 +00:00
/* @flow */
var exec = require('child_process').exec;
// callback only.
exec('ls', function(error, stdout, stderr) {
console.info(stdout);
});
// options only.
exec('ls', {timeout: 250});
// options + callback.
exec('ls', {maxBuffer: 100}, function(error, stdout, stderr) {
console.info(stdout);
});