help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cfengine-die help...


From: Christian Pearce
Subject: Re: cfengine-die help...
Date: Tue, 14 Sep 2004 11:07:52 -0400

I mistakenly put that before.  I want the shutdown to go into the
background.  If I did && it would wait for shutdown to finish then it
would echo "cfengine-die".  Which leaves me where I was before.  I think
the shell command is correct.  I am puzzled as to why shutdown gets
killed.  hmm maybe nohup doesn't block the SIGALRM.  Only the SIGHUP. 
Maybe we need to change this behavior in cfengine.  Considering we
aren't using the alarm timer for anything other than 0.  Which is
immediate.  This way we could block the hup with a nohup.  Unless I am
misunderstanding this.

On Tue, 2004-09-14 at 11:03, Predrag Zecevic - Solaris System
Administrator wrote:
> Hi Christian,
> 
> you are missing one '&' in command bellow: shouldn't this look like: ... 
> && echo "cfengine-die" ?
> Regards ;-)
> 
> Christian Pearce wrote:
> 
> >    # Reboot if scheduled automation occurs
> >    reboot::
> >        '$(nohup) $(shutdown) -y -g 300 -i 6 "SysNav is rebooting the
> >server to install patch Cluster(s)." & echo "cfengine-die"'
> >            background=true
> >            useshell=true
> >
> >Can someone explain to me the process under which cfengine kills a
> >forked script?  This is the last statement I tried.  I call shutdown
> >with nohup, but that doesn't seem to keep cfengine from killing it after
> >I echo the cfengine die.  Unfortunately if I don't use cfengine-die
> >cfengine will not continue executing.
> >
> >I assume this is the code that does it
> >   
> >   if (ptr->timeout != 0)
> >      {
> >      alarm(0);
> >      signal(SIGALRM,SIG_DFL);
> >      }
> >
> >alarm(0) sets the seconds for the signal to be generated to zero.
> >signal(SIGALRM, SIG_DFL) executes Terminate by default with the SIG_DFL
> >handle.  
> >
> >But shutdown still gets killed off.
> >  
> >
-- 
Christian Pearce
http://www.commnav.com
http://www.perfectorder.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]