Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.
/ node-passthru Public archive

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

License

Notifications You must be signed in to change notification settings

gmiroshnykov/node-passthru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-passthru

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

Build Status

Usage

passthru(command, [options], [callback]);

For example, do an ls -la in the current directory:

var passthru = require('passthru');
passthru('ls -la', function(err) {
    // ...
});

You can also pass command as an array of strings. This is mandatory for arguments containing spaces and other special characters.

passthru(['ls', '-la'], function(err) {
    // ...
});

You can use any options supported by child_process.spawn:

passthru('ls -la', {cwd: '/tmp'}, function(err) {
    // ...
});

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published