UNPKG

passthru

Version:

Spawns a child process attached to parent's stdin, stdout and stderr. Inspired by PHP's passthru().

11 lines (9 loc) 232 B
var abort = setTimeout(function() { console.error('Timeout reached, aborting.'); process.exit(1); }, 1000); var passthru = require('..'); passthru('cat', function(err) { if (err) throw err; clearTimeout(abort); });