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: [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 wait until finishes

2011-07-19 Thread Marco van de Voort
In our previous episode, Sven Barth said: > 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. Probably you have to walk to some of the job control related commands which

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

2011-07-19 Thread waldo kitty
On 7/19/2011 14:14, Sven Barth wrote: 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

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

2011-07-19 Thread Sven Barth
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

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

2011-07-19 Thread fred f
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; Thanks. F. On Sat, Jul 16, 2011 at 5:49 AM, leledumbo

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

2011-07-15 Thread leledumbo
Try Michael's suggestion. It works, even on other platforms. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Linux-How-to-execute-a-program-but-not-to-wait-until-finishes-tp4550251p4593043.html Sent from the Free Pascal - General mailing list archive at Nabble.co

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

2011-07-15 Thread fred f
first of all, thanks for answers, but >> fpsystem('/my/path/to/exe &'); works fine and it does what I want, but when my application ends then the started app over fpsystem is closed as well. Thanks in advance. F. ___ fpc-pascal maillist - fpc-pascal

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

2011-07-05 Thread Lukasz Sokol
On 04/07/2011 18:05, Marco van de Voort wrote: > In our previous episode, Lukasz Sokol said: >> >> ExecuteProcess('/bin/bash -c /my/path/to/exe &'); // >> (probably...?) > > First, the binary name is always separate, there are minimal two > parameters. You've snipped a ' :)' that was in the nex

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

2011-07-04 Thread Marco van de Voort
In our previous episode, Lukasz Sokol said: > > ExecuteProcess('/bin/bash -c /my/path/to/exe &'); // (probably...?) First, the binary name is always separate, there are minimal two parameters. Moverover I would use the separate syntax, or use "" to signal that the /commandline my... & belongs t

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

2011-07-04 Thread Lukasz Sokol
On 04/07/2011 08:14, fred f wrote: > Hi all, > > How can I execute an external program, but to let my code continue. > > This doesn't work as I want and waits for finishing called app: > > ExecuteProcess (MyPathToExe, ' &'); > That would only work if you do ExecuteProcess('/bin/bash -