-
Notifications
You must be signed in to change notification settings - Fork 45
Dev #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
With --first, all processes are terminated after the first process terminated (regardless of the exit code). The exit code is the exit code of the process that terminated first.
introduce --first option
Cool, I guess we tried |
I did deep testing on linux and windows, was quite a tinkering 😄 But before releasing I would like to wait for some positive resonance, what do you think? |
Sounds like a good idea. I'll try it out on a couple of projects and let you know how it goes. |
FYI for everyone coming here, to install this development version - run: npm install git+ssh://github.com/keithamus/parallelshell.git#dev If people report this as working we can merge it and cut a new version 😄 |
console.log('-w, --wait will not close sibling processes on error') | ||
console.log('-v, --verbose verbose logging'); | ||
console.log('-w, --wait will not close sibling processes on error'); | ||
console.log('-f, --first close all sibling processes after first exits (succes/error)'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
succes is spelled success.
@paulpflug I've just had some time to try this out on a project, and noticed I'm getting errors due to the with $ parallelshell 'echo hello' -v
parallelshell: `echo hello` failed with exit code 1
parallelshell: exit code: 1 with $ parallelshell 'echo hello' -v
parallelshell: `echo hello` ended successfully
parallelshell: exit code: 0 Finally, omitting stdio and instead adding $ parallelshell 'echo hello' -v
hello
parallelshell: `echo hello` ended successfully
parallelshell: exit code: 0 Obviously the last one is the most desirable, but I dont know why spawn is erroring when I just hand off the streams to the stdio option, as it's a valid option... |
stdio: ['pipe', process.stdout, process.stderr] | ||
stdio: ['pipe', process.stdout, process.stderr], | ||
windowsVerbatimArguments: process.platform === 'win32', | ||
detached: process.platform != 'win32' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any output when I run commands now. Seems this line is the culprit. Why are we detaching the process?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So they can be killed properly and we don't end up with zombie processes. I actually think L122 is the culprit more than L124
If I remember correctly, the piping will not preserve color and format. Am 21. September 2015 10:51:45 nachm. schrieb Keith Cirkel
|
@keithamus In the child_process manual it says:
Maybe the process has not 'open'ed yet? Anyway I think we just want to use integers like so:
Also, why are we opening a pipe? |
Just opened #35. This is working for me. |
Now only kills running processes. with @fabiosantoscode
Return exit code 0 on delayed child process error
New version with all problems resolved 😄