Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

The 'ol shell timeout question

by xiper (Friar)
on Jun 18, 2003 at 02:00 UTC ( [id://266703]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $exit = &command( "/bin/snore", 60 );
    
  2. or download this
    eval {
      local $SIG{ALRM} = sub { die "alarm clock restart" };
    ...
      alarm 0;
    };
    if ($@ and $@ !~ /alarm clock restart/) { die }
    
  3. or download this
    #! /usr/bin/perl
    use strict;
    ...
      if( $@ ) { return undef    }
      else     { return $? / 256 }
    }
    
  4. or download this
    my JAPH:
      print"Just another Perl hacker\n";
      #    ^ look, no space! pretty tricky hey?
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://266703]
Approved by crouchingpenguin
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-03-28 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found