Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Mark Morgan Lloyd
Thaddy wrote: On 3-12-2010 13:52, Michael Van Canneyt wrote: As said in my other mail: The behaviour of Input, Output, StdErr is not governed by OS rules, but by the pascal standard. Michael. My understanding has always been that the PASCAL syntax allowed for console IO in a way that enca

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Daniël Mantione
Op Fri, 3 Dec 2010, schreef Thaddy: On 3-12-2010 15:50, Daniël Mantione wrote: Could you maybe specify what you want to achieve and in what way FPC requires you to use workaround hacks? Daniël Yes, In FPC the console IO is *always* redirected, be it through a handle or a named file.

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Florian Klaempfl
Am 03.12.2010 16:11, schrieb Thaddy: > On 3-12-2010 15:50, Daniël Mantione wrote: >> >> Could you maybe specify what you want to achieve and in what way FPC >> requires you to use workaround hacks? >> >> Daniël > Yes, > > In FPC the console IO is *always* redirected, be it through a handle or > a

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Thaddy
On 3-12-2010 15:50, Daniël Mantione wrote: Could you maybe specify what you want to achieve and in what way FPC requires you to use workaround hacks? Daniël Yes, In FPC the console IO is *always* redirected, be it through a handle or a named file. The named file is expected to be independe

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Sven Barth
Am 03.12.2010 13:22, schrieb Thaddy: Sorry if this is already picked up as it IMHO should have been. I missed some mails due to a server crash. Today I encountered a similar issue with using threadvars for the input, output and err variables in system when trying to use the input as a win32 sync

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Daniël Mantione
Op Fri, 3 Dec 2010, schreef Thaddy: If you all say no, I will live with it. Could you maybe specify what you want to achieve and in what way FPC requires you to use workaround hacks? Daniël___ fpc-devel maillist - fpc-devel@lists.freepascal.or

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Thaddy
On 3-12-2010 13:52, Michael Van Canneyt wrote: As said in my other mail: The behaviour of Input, Output, StdErr is not governed by OS rules, but by the pascal standard. Michael. My understanding has always been that the PASCAL syntax allowed for console IO in a way that encapsulates the co

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Thaddy
Note the console IO functions are *as I read it and can show it* are supposed NOT to share a single handle. Only the use of the std file names should guarantee a common handle and that is where FPC fails my tests. The redirection for other purposes on a OS level call under windows and posix will

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Michael Van Canneyt
On Fri, 3 Dec 2010, Thaddy wrote: On 3-12-2010 13:38, Michael Van Canneyt wrote: On Fri, 3 Dec 2010, Thaddy wrote: Sorry if this is already picked up as it IMHO should have been. I missed some mails due to a server crash. Today I encountered a similar issue with using threadvars for the

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Michael Van Canneyt
On Fri, 3 Dec 2010, Thaddy wrote: On 3-12-2010 13:22, Thaddy wrote: --- CreateFile; lpFileName Use the CONIN$ value to specify console input. Use the CONOUT$ value to specify console output. CONIN$ gets a handle to the console input buffer, even if the SetStdHandle function redirects th

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Thaddy
On 3-12-2010 13:38, Michael Van Canneyt wrote: On Fri, 3 Dec 2010, Thaddy wrote: Sorry if this is already picked up as it IMHO should have been. I missed some mails due to a server crash. Today I encountered a similar issue with using threadvars for the input, output and err variables in s

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Michael Van Canneyt
On Fri, 3 Dec 2010, Thaddy wrote: Sorry if this is already picked up as it IMHO should have been. I missed some mails due to a server crash. Today I encountered a similar issue with using threadvars for the input, output and err variables in system when trying to use the input as a win32 s

Re: [fpc-devel] Console IO revisited

2010-12-03 Thread Thaddy
On 3-12-2010 13:22, Thaddy wrote: --- CreateFile; /lpFileName/ Use the CONIN$ value to specify console input. Use the CONOUT$ value to specify console output. CONIN$ gets a handle to the console input buffer, even if the *SetStdHandle*

[fpc-devel] Console IO revisited

2010-12-03 Thread Thaddy
Sorry if this is already picked up as it IMHO should have been. I missed some mails due to a server crash. Today I encountered a similar issue with using threadvars for the input, output and err variables in system when trying to use the input as a win32 sync handle with the CreateFile API. Fa