[Gambas-user] Re; Console applications ..

Benoit Minisini gambas at ...1...
Tue Jul 17 18:51:23 CEST 2007


On mardi 17 juillet 2007, Gareth Bult wrote:
> Hi,
>
> Is there a "proper" way to background a gambas console application ...
>
> I'm currently doing;
>
> application >/dev/null 2>&1 &
>
> I'm conscious that it's not closing stdin, but it "seems" to be working ok
> ..
>
> Any recommendations ?
>
> Gareth.

You can daemonize it now, by setting Application.Daemon to TRUE. 

When daemonized, thr application forks, the parent fork terminates, so that 
there is no connection with the initial application parent process, and the 
child fork closes its standard output, input, error output, and sets its 
current directory to "/".

You cannot return to the "non-daemonized" state of course.

The name of this property may change if I (or somebody else) find a better 
name.

Regards,

-- 
Benoit Minisini




More information about the User mailing list