RE : [fpc-pascal] Re: Linux: How to execute a program, but not towait until finishes

2011-07-20 Thread Ludo Brands
> -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,

Re: [fpc-pascal] Re: Linux: How to execute a program, but not to wait until finishes

2011-07-20 Thread Jonas Maebe
On 20 Jul 2011, at 08:13, Marco van de Voort wrote: > Probably you have to walk to some of the job control related commands which > are also done during daemonization. Essentially you want to detach from > parent, but maybe not become a full daemon (without stdin-out, specially > when they are pi

RE : [fpc-pascal] Re: Linux: How to execute a program, but not to waituntil finishes

2011-07-20 Thread Ludo Brands
with TProcess.Create(nil) do begin CommandLine := '/my/path/to/exe'; Execute; Free; end; works fine. The child continues after the parent dies. Ludo > -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org > [mailto:fpc-pascal-boun...@lists.freepascal.org]

Re: RE : [fpc-pascal] Re: Linux: How to execute a program, but not to waituntil finishes

2011-07-20 Thread fred f
I don't know on which system you tried, but on my Ubuntu 11.04 64bit it dies with parent one. On Wed, Jul 20, 2011 at 9:53 AM, Ludo Brands wrote: >  with TProcess.Create(nil) do begin >    CommandLine := '/my/path/to/exe'; >    Execute; >    Free; >  end; > > > works fine. The child continues aft

Re: [fpc-pascal] Re: Linux: How to execute a program, but not to wait until finishes

2011-07-20 Thread fred f
On Wed, Jul 20, 2011 at 9:12 AM, Jonas Maebe wrote: > > On 20 Jul 2011, at 08:13, Marco van de Voort wrote: > >> Probably you have to walk to some of the job control related commands which >> are also done during daemonization. Essentially you want to detach from >> parent, but maybe not become a

RE : RE : [fpc-pascal] Re: Linux: How to execute a program, but not towaituntil finishes

2011-07-20 Thread Ludo Brands
Ubuntu 10.04 64 bit. Attached the test program. Compile and launch $ ./testshell your-program You'll find your-program in ps -l parented to PID 1. Ludo > -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org > [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de

RE : RE : RE : [fpc-pascal] Re: Linux: How to execute a program, but not towaituntil finishes

2011-07-20 Thread Ludo Brands
BTW fpc svn 17615 Tried this also on solaris x86 and ubuntu 11.04 32 bit. Ludo > -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org > [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part > de Ludo Brands > Envoyé : mercredi 20 juillet 2011 12:49 > À : 'FPC-Pascal

RE : RE : [fpc-pascal] Re: Linux: How to execute a program, but not towaituntil finishes

2011-07-20 Thread Ludo Brands
I only see this behavior when running the program from lazarus. Lazarus and/or gdb seem to clean up orphans when exiting the parent process. Ludo > I don't know on which system you tried, but on my Ubuntu > 11.04 64bit it dies with parent one. > > On Wed, Jul 20, 2011 at 9:53 AM, Ludo Brands