Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Unruly children...

by aaron.m (Novice)
on Feb 18, 2010 at 20:37 UTC ( #824028=perlquestion: print w/ replies, xml ) Need Help??
aaron.m has asked for the wisdom of the Perl Monks concerning the following question:

I have a script with the following:
unlink("/ngvob/ui_rel/.emodel_is_running.flag"); $SIG{'CHLD'} = 'IGNORE';
This is on - don't laugh - Solaris 2.6 SPARC, running Perl 5.004_04. I can't change that; it's a legacy app that we still support.

This block is called when we're bringing down the entire system; the function is called Crash(), so we expect that things aren't working quite right, but not quite as bad as what we're seeing.

On certain occasions, the Perl script in charge of things craps the bed. The most recent example produced these messages in the log files:
Can't exec "/ngvob/ui_rel/.emodel_is_running.flag": Interrupted syst +em call at /path/to/myscript line 596 SIGCHLD handler "IGNORE" not defined.
Line 596 corresponds to the "unlink" line.

I don't really understand either of these messages. "Can't exec" looks like it's trying to execute the .emodel_is_running.flag file, instead of unlink() it. And how 'IGNORE' is not defined is puzzling.

Has anyone seen behavior like this, before?

Comment on Unruly children...
Select or Download Code
Re: Unruly children...
by snoopy (Deacon) on Feb 18, 2010 at 23:56 UTC
    Just a punt. Maybe a parent process, system shutdown or something else is sending signals that aren't being handled and are causing general havoc.

    One thing to try, if you're not already, is to trap and report on incoming signals, just to see what's going on.

    foreach (qw/HUP QUIT KILL TERM/) { my $msg = "slugged by a $_"; $SIG{$_} = sub {warn $msg}; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://824028]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2014-07-28 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (201 votes), past polls