Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Pass signals and argv from C to embedded Perl

by kschwab (Vicar)
on Jan 31, 2019 at 13:45 UTC ( #1229199=note: print w/replies, xml ) Need Help??


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.
  • Comment on Re: Pass signals and argv from C to embedded Perl

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1229199]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2022-01-28 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (73 votes). Check out past polls.

    Notices?