> > > > 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".


In reply to Re^4: How to portably stop processes? by LanX
in thread How to portably stop processes? by haj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.