> -----Message d'origine----- > De : fpc-pascal-boun...@lists.freepascal.org > [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part > de Sven Barth > Envoyé : mardi 19 juillet 2011 20:14 > À : fpc-pascal@lists.freepascal.org > Objet : Re: [fpc-pascal] Re: Linux: How to execute a program, > but not towait until finishes > > > On 19.07.2011 16:52, fred f wrote: > > Hi, > > > > use this code, which starts itself, but when you close > first started > > the second ends as well, what I don't want. > > > > with TProcess.Create (Application) do begin > > CommandLine := Application.ExeName + '&'; > > Execute; > > Free; > > end; > > If I remember correctly this is simply the way Unix behaves. If the > parent process terminates all children are terminated as > well. I don't > know how one can circumvent this. >
Orphans are reparented to PID 1, the init process. Simple demonstration in a terminal $ sh $ gedit & $ ps -l You see that gedit is parented to the sh just launched. $ exit $ ps -l gedit is still running but now parented to pid 1. Ludo _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal