Re: init script question

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



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

Attachment: pgpXaXjRsih2R.pgp
Description: PGP signature

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux