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 LanX (Saint) on Mar 31, 2023 at 20:58 UTC
    > > > > The PID returned from fork is apparently useless.

    > > Did you test your "solution" against his setting?

    > Yes, I have tested my answer on Windows XP, Windows 7, and Windows 10

    To be clear, the OP is using Perl commands (!) like $child_pid = fork , that's the "setting" you have to test.

    You just copied the whole documentation (~ 70 lines) for a Windows command named "taskkill", but not a bit of Perl code.

    Now, if you say you were able to use taskkill to kill a $child_pid returned from a Perl ° fork without the problems the OP described, I (and others) would be very pleased to see that Perl code.

    So please show us your test, no matter which version of Windows.

    This would merit a lot of upvotes.

    > why do you downvote my answer?

    How do you want to know that I downvoted your answer?

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

    °) please note the OP's use of the word "portably".

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^4: How to portably stop processes?
by Anonymous Monk on Mar 31, 2023 at 20:46 UTC
    probably downvoted because you didnt answer the question! op knows how to handle win but was asking about *portable*

    and complaining about being downvoted will get you downvoted too, just do better next time

      > op knows how to handle win

      And Perl knows how to kill real processes.

      But these are emulated with Windows threads, because Win doesn't fork.

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