Thanks for your prompt reply BrowserUK.
That still doesn't do the trick. The following code is used to include the Perl::Unsafe::Signals module.
use Perl::Unsafe::Signals;
print "Evaluating... \n";
#eval{
local $SIG{ALRM} = sub {
$sys_check_mount{$mount_server} = 0;
print "Alarm!";
exit();
};
alarm(5);
print "Alarm Set... Trying system commands... \n";
UNSAFE_SIGNALS {
print "Using unsafe signals... \n";
if (-e $mount_server_check_path && utime(undef, undef, "$m
+ount_server_check_path/mount_check")){
#print "OK\n";
$sys_check_mount{$mount_server} = 1;
}else{
#print "Broken\n";
$sys_check_mount{$mount_server} = 0;
push (@mount_server_broken,$mount_server);
}
};
alarm(0);
print "Reset Alarm... \n";
Any other suggestions are appreciated :)
Upon further investigation it seems something must be a-miss somewhere else in the program. The following code sniplet alarm's just fine:
perl -e 'alarm shift @ARGV; exec @ARGV' 3 touch /node/store1/videos/mo
+unt_check
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.