[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nohup in shellcommands: cfengine waits indefinitely
From: |
Ed Brown |
Subject: |
Re: nohup in shellcommands: cfengine waits indefinitely |
Date: |
Fri, 18 Mar 2005 08:07:23 -0700 |
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