http://qs1969.pair.com?node_id=11151402


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 (Vicar) 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 (Saint) 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.