> -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,
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
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]
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
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
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
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
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