Re: [fpc-pascal] TProcess questions

2006-10-04 Thread Adrian Maier
On 10/3/06, Adrian Maier [EMAIL PROTECTED] wrote: On 10/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Tue, 3 Oct 2006, Adrian Maier wrote: On 10/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: Any idea how should i quote the arguments so that they would be properly

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Michael Van Canneyt
On Tue, 3 Oct 2006, Adrian Maier wrote: Hello, I have several questions about executing external programs with TProcess 1. I need to execute the following command : psql -q -f /home/am/src/gfaf/hlemit_d.sql -v D1='1-apr-06' -v D2='1-jun-06' (it might not be obvious at first sight

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Michael Van Canneyt
On Tue, 3 Oct 2006, Michael Van Canneyt wrote: 2. Where is the TProcess documented on the freepascal website? I had found a FCL.pdf some time ago , but I am unable to find that doc on the freepascal website. It is not documented currently. It's scheduled as the next unit to be

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Vincent Snijders
Michael Van Canneyt schreef: On Tue, 3 Oct 2006, Adrian Maier wrote: 2. Where is the TProcess documented on the freepascal website? I had found a FCL.pdf some time ago , but I am unable to find that doc on the freepascal website. It is not documented currently. It's scheduled as the next

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Adrian Maier
On 10/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: Any idea how should i quote the arguments so that they would be properly treated by TProcess? You can't. The following lines (line 107 of unix/process.inc) Result:=StringReplace(Result,'','',[rfReplaceAll]);

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Michael Van Canneyt
On Tue, 3 Oct 2006, Adrian Maier wrote: On 10/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: Any idea how should i quote the arguments so that they would be properly treated by TProcess? You can't. The following lines (line 107 of unix/process.inc)

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Adrian Maier
On 10/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Tue, 3 Oct 2006, Adrian Maier wrote: On 10/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: Any idea how should i quote the arguments so that they would be properly treated by TProcess? You can't. The following lines

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Adrian Maier
On 10/3/06, Michael Van Canneyt [EMAIL PROTECTED] wrote: I will see about fixing it. Could you please post a bug report so it won't be forgotten. Mantis issue 7534 added . Is it likely for the fix to go into fpc 2.0.4? Or just in the HEAD ? Cheers, Adrian Maier

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Adrian Maier
On 10/3/06, Adrian Maier [EMAIL PROTECTED] wrote: Well, first of all you should do a 'IsRunning' (or running) before checking the exitcode. I'm using the poWaitOnExit option, so my program doesn't waits until the external process ends. All I need is to know if the external process ended

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Marco van de Voort
On Tue, 3 Oct 2006, Adrian Maier wrote: It's a painful one. I was hoping to switch to TProcess instead of shell ( which isn't cross-platform ) ... The bug won't occur on windows :) I will see about fixing it. Could you please post a bug report so it won't be forgotten. Wouldn't

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Adrian Maier
On 10/3/06, Marco van de Voort [EMAIL PROTECTED] wrote: On Tue, 3 Oct 2006, Adrian Maier wrote: It's a painful one. I was hoping to switch to TProcess instead of shell ( which isn't cross-platform ) ... The bug won't occur on windows :) I will see about fixing it. Could you please

Re: [fpc-pascal] TProcess questions

2006-10-03 Thread Andrew Haines
Adrian Maier wrote: So, initially the Environment is empty and the program inherits the variables. When I append the first variable, it will no longer inherit the variables. I find the behaviour counterintuitive: the first append causes the Environment to be initialised. I haven't