Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^11: Doing every X seconds

by anonymized user 468275 (Curate)
on Aug 08, 2018 at 06:38 UTC ( [id://1220054]=note: print w/replies, xml ) Need Help??


in reply to Re^10: Doing every X seconds
in thread Doing every X seconds

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^12: Doing every X seconds
by hippo (Bishop) on Aug 08, 2018 at 09:12 UTC
    the OP only wants two processes in parallel which is too obviously not a case where undef can occur.
    $ cat cantfork.pl #!/usr/bin/perl use strict; use warnings; my $child = fork; die "Well that's odd - the fork failed" unless defined $child; if ($child) { print "Parent! Child is $child\n"; } else { print "Child!\n"; } sleep 1; exit; $ ./cantfork.pl Parent! Child is 17198 Child! $ ulimit -u 9 $ ./cantfork.pl Well that's odd - the fork failed at ./cantfork.pl line 6.

    Always code defensively, especially when using system calls as they can fail at any time for any reason.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-19 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found