help-cfengine
[Top][All Lists]
Advanced

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

Re: nohup in shellcommands: cfengine waits indefinitely


From: Adams, Russell L.
Subject: Re: nohup in shellcommands: cfengine waits indefinitely
Date: Fri, 18 Mar 2005 09:39:48 -0600
User-agent: Mutt/1.4.2.1i

Not to toot my own horn, but check out the Tips & Tricks page
regarding Hung Shellcommands on cfwiki.org.

Russell

On Fri, Mar 18, 2005 at 08:07:23AM -0700, Ed Brown wrote:
> This is a Regularly Asked Question, if not Frequently, and has to do
> with file descriptors not being handled properly somewhere in the init
> script.  Try appending "</dev/null" to your shellcommand.
> 
> -Ed
> 
> 
> 
> On Fri, 2005-03-18 at 02:05, greg wrote:
> > Hello there,
> > 
> > I have a startup script that I'd like to run whith shellcommands. This 
> > script uses nohup to run the
> > binary file:
> > 
> > #!/bin/shell
> > [...]
> > su - ${user} -c "nohup /opt/foo/bin/bar &"
> > exit 0
> >  
> > In my cfagent.cfg file:
> > 
> > shellcommands:
> > 
> > "/my/init/script start"
> > 
> > 
> > The problem is: when I run cfagent, it "waits" for /opt/foo/bin/bar. I have 
> > to stop /opt/foo/bin/bar
> > to make cfagent end properly. Otherwise, I have to Ctrl-c it.
> > I already tried "background=true", "useshell=false", the result is the same.
> > When I try "timeout=X", cfagent ends properly, but /opt/foo/bin/bar doesn't 
> > run.
> > 
> > I don't understand what's wrong with my script, or my conf ? Thanks a lot 
> > for your help !
> > 
> >         greg
> > 
> > --
> > http://www.livretdulibre.org/html-ed2/livret_libre.html
> > 
> > 
> > 
> > _______________________________________________
> > Help-cfengine mailing list
> > Help-cfengine@gnu.org
> > http://lists.gnu.org/mailman/listinfo/help-cfengine
> 
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine




reply via email to

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