Git Product home page Git Product logo

Comments (6)

gspencergoog avatar gspencergoog commented on September 1, 2024

When you say "detatched process", are you talking about something like bash's "disown" command, or do you mean the difference between Process.run and Process.start?

ProcessRunner.runProcess code uses Process.start inside.

from process_runner.

shreyashsaitwal avatar shreyashsaitwal commented on September 1, 2024

I'm not quite familiar with how Bash's disown command works, but what I mean by "detached" is that the spawned child process should continue running even after the parent exits (or is forcefully killed).

from process_runner.

gspencergoog avatar gspencergoog commented on September 1, 2024

Ahh, so you mean the ProcessStartMode.detached then? (ProcessStartMode)

There isn't currently a way to do that in process_runner. I could easily add that as a parameter, but I'm not sure exactly what that would mean, since detached really just means "start this process and disconnect from it", so ProcessRunner really doesn't add much value in that scenario: it wouldn't be able to provide output or exit code information, only the PID.

from process_runner.

shreyashsaitwal avatar shreyashsaitwal commented on September 1, 2024

Ahh, so you mean the ProcessStartMode.detached then?

Yes, that's correct.

so ProcessRunner really doesn't add much value in that scenario: it wouldn't be able to provide output or exit code information, only the PID

I guess, it'd be quite helpful in some niche senarios, such as updating your CLI applications. On Mac and Linux you can easily delete the current running executable and replace it with a new one, but on Windows, it's not possible to do that. Having the ability to start a detached process would make it fairly simple to update the executable.

I could easily add that as a parameter

It'd be very nice if you'd do that. Looking forward to your response. 😃

from process_runner.

gspencergoog avatar gspencergoog commented on September 1, 2024

@shreyashsaitwal Thanks for the request, 4.0.1 should do what you want.

from process_runner.

shreyashsaitwal avatar shreyashsaitwal commented on September 1, 2024

Thanks a lot, @gspencergoog! 😃

from process_runner.

Related Issues (3)

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.