Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^3: How to portably stop processes?

by harangzsolt33 (Hermit)
on Apr 01, 2023 at 00:51 UTC ( #11151402=note: print w/replies, xml ) Need Help??

in reply to Re^2: How to portably stop processes?
in thread How to portably stop processes?

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^4: How to portably stop processes?
by haj (Priest) on Apr 01, 2023 at 12:43 UTC
    All right, create a sub called "KillProc()" and then put an if statement in that sub. Execute block A if it's Linux, or execute block B if it's Windows. Portable. Done!

    Why should I bother? I already have a satisfactory solution with Proc::Background, and I wrote that I am happy with it. It's that simple. Why should I even consider to write the same logic myself?

Re^4: How to portably stop processes?
by LanX (Sage) on Apr 01, 2023 at 01:33 UTC
    > It's that simple!

    Brilliant and now please show us working code where taskkill can handle an ID you get from fork ...

    Cheers Rolf
    (addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
    Wikisyntax for the Monastery

    PS: yes, I downvoted you now.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11151402]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2023-06-04 10:34 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (20 votes). Check out past polls.