[fpc-devel] Tprocess using pipes, handle = 0

Michael Van Canneyt michael at freepascal.org
Tue Mar 17 23:01:31 CET 2015



On Tue, 17 Mar 2015, Martin Frb wrote:

> On 17/03/2015 21:04, Martin Frb wrote:
>> On 17/03/2015 21:00, Marco van de Voort wrote:
>>>> Or could an Handle (active/all ok) be 0?
>>> 0 is standard input.
>>> 
>> 
>> Ah, except, if stdiin is closed, it can go to whatever handle is next....
>
> Are there any values that are known to be ont a handle?
>
> On windows codetools find InvalidHandleValue = -1
> But on Linux I found nothing like this.
>
> Given that fpselect is documented to have a bit-array of 256 bits, I would 
> guess only 0 to 255 are valid? Though of course that may change...
>
> What about -1 or negative in generic?

Negative is not a valid file handle.

Michael.



More information about the fpc-devel mailing list