in reply to Re^5: Fork and creating a thread exits the process
in thread Fork and creating a thread exits the process

This test works on 32bit Strawberry. And to be clear, my program works with that Perl version too, both with forking and threads, it seems to be the only Perl that it works on.

  • Comment on Re^6: Fork and creating a thread exits the process

Replies are listed 'Best First'.
Re^7: Fork and creating a thread exits the process
by pryrt (Abbot) on Jul 31, 2020 at 14:56 UTC
    This test works on 32bit Strawberry.

    But does it work for you on 64bit? I ask this because you said,

    tested now with Strawberry 64bit and I wasn't able to get it work. But I tried again starting with a fresh 32bit version at that still does work.

    With my code, I was showing a fork-based program that was known-working for me in 64bit, and wanted you to see whether or not my code worked on your 64bit Strawberry.

    32bit Strawberry ... seems to be the only Perl that it works on

    I do not see that limitation. The code I posted works for me on both 32bit and 64bit.

      Sorry for the late reply.

      The test script did work on a 64bit Strawberry too.

        Great. Now you need to figure out why mine works but yours doesn't. Either start with yours and slowly take things out to simplify toward mine, until it starts working; or start with mine and slowly add things to make it more like yours until it stops working.