GithubHelp home page GithubHelp logo

Comments (2)

keithamus avatar keithamus commented on July 17, 2024

Hey @philer thanks for the issue.

We had a discussion about this in #5. Hopefully this will provide some good context for you.

Abridged is:

  • & creates a background process, which only exits if you kill it or it ends. parallelshell will autokill processes if one of the others dies.
  • Your example (command1 & command2 & command3) will wait in the terminal until command3 ends only. parallelshell will wait until all 3 end.
  • In your example, if command1/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.
  • In your example, pressing Ctrl+C will exit command3 but not 1/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)
  • You could use wait to alleviate some of these issues, but wait does not solve them all, and is not available in Windows (as far as I know)

If you don't need the above, feel free to use & or wait. If you need all of the above, use parallelshell πŸ˜„

from parallelshell.

philer avatar philer commented on July 17, 2024

I see. Should have searched the issues first.
Thanks for your answer, I can see now how your tool could be helpful. :)

from parallelshell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.