Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
parallelshell
Advanced tools
This is a super simple npm module to run shell commands in parallel. All processes will share the same stdout/stderr, and if any command exits with a non-zero exit status, the rest are stopped and the exit code carries through.
How is this different than:
$ cmd1 & cmd2 & cmd3
Cross platform -- works on Unix or Windows.
&
creates a background process, which only exits if you kill it or it ends. parallelshell
will autokill processes if one of the others dies.
command1 & command2 & command3
will wait in the terminal until command3 ends only. parallelshell will wait until all 3 end.
If command1 or command2 exit with non-zero exit code, then this will not effect the outcome of your shell (i.e. they can fail and npm/bash/whatever will ignore it). parallelshell
will not ignore it, and will exit with the first non-zero exit code.
Pressing Ctrl+C will exit command3 but not 1 or 2. parallelshell
will exit all 3
parallelshell
outputs all jobs stdout/err to its stdout/err. background jobs do that... kind of coincidentally (read: unreliably)
Simply run the following to install this to your project:
npm i --save-dev parallelshell
Or, to install it globally, run:
npm i -g parallelshell
To use the command, simply call it with a set of strings - which correspond to shell arguments, for example:
parallelshell "echo 1" "echo 2" "echo 3"
This will execute the commands echo 1
echo 2
and echo 3
simultaneously.
Note that on Windows, you need to use double-quotes to avoid confusing the argument parser.
Available options:
-h, --help output usage information
-v, --verbose verbose logging
-w, --wait will not close sibling processes on error
v3.0.1
FAQs
Invoke multiple commands, running in parallel
The npm package parallelshell receives a total of 9,095 weekly downloads. As such, parallelshell popularity was classified as popular.
We found that parallelshell demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.