http://qs321.pair.com?node_id=1229199


in reply to Pass signals and argv from C to embedded Perl

Replace:
"sleep(10000);\n"
With:
"for(1..100){sleep(1);print\"$_\\n\";}\n"
And, make sure there's a newline in the print from the SIGINT handler. It should work now. The ctrl-c interrupts the sleep(10000), so that's why the perl exits. With the change above, you'll see the for loop resume after the ctrl-c.

Replies are listed 'Best First'.
Re^2: Pass signals and argv from C to embedded Perl
by bliako (Monsignor) on Jan 31, 2019 at 16:15 UTC

    That works thank you

      Can you post the version that incorporates ikegami's source?

        I have updated a post further up with the working code