[CentOS] init script question

Ralph Angenendt ra+centos at br-online.de
Sat Dec 13 14:22:09 UTC 2008


Phil Schaffner wrote:
> Davide Cittaro wrote:
> > Ok, another one: the process I would like to start is not a daemon  
> > itself. If I start it with "daemon" function it remains in foreground.  
> > Ok, I can play with '&' but is there a init function to start in  
> > background a process?
> 
> You just hijacked your own thread.  Better to start a new one.

Nope, we're still in init-script territory :)

> The workaround I have used in this situation is a wrapper script that 
> redirects stdin, stdout, and stderr and backgrounds, but that is playing 
> with '&' indirectly.  Please post if you find a more elegant solution.

True. "daemon" itself cannot do that if the script doesn't detach from the
terminal itself. But within the init script a "&" should be sufficient if
no output is expected.

Ralph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.centos.org/pipermail/centos/attachments/20081213/4ea00da0/attachment.bin 


More information about the CentOS mailing list