lib/spawn.js
function (command, params, opts) {
        var self = this;
        this.cmd = spawn(command, params, opts);

        this.cmd.stdout.on('readable', function () {
            self.isSpawnReadable = true;
            privatePump.apply(self);
        });
        this.cmd.stdout.on('end', function () {
            self.push(null);
        });
        this.on('finish', function () {
            this.cmd.stdin.end();
        });

    }
function (command, params, opts) {
        var self = this;
        this.cmd = spawn(command, params, opts);

        this.cmd.stdout.on('readable', function () {
            self.isSpawnReadable = true;
            privatePump.apply(self);
        });
        this.cmd.stdout.on('end', function () {
            self.push(null);
        });
        this.on('finish', function () {
            this.cmd.stdin.end();
        });

    }
function ( command , params , opts ) { var self = this ; this . cmd = spawn ( command , params , opts ) ; this . cmd . stdout . on ( 'readable' , function ( ) { self . isSpawnReadable = true ; privatePump . apply ( self ) ; } ) ; this . cmd . stdout . on ( 'end' , function ( ) { self . push ( null ) ; } ) ; this . on ( 'finish' , function ( ) { this . cmd . stdin . end ( ) ; } ) ; }
Spawn a process and set stdin to writable stream and stdout to readable stream.

Please take a look at node.js-API for further information.

@param {string} command - Command name that shoul be executed
@param {string[]} [params] - Parameters to set in spawned process
@param {{}} [opts] - Optional spawn settings
Spawn a process and set stdin to writable stream and stdout to readable stream .