Re: POpen en PClose

Michael Van Canneyt via fpc-pascal <[email protected]> Mon, 20 Jul 2026 11:43:49 +0200 (CEST)
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <[email protected]>

On Mon, 20 Jul 2026, Adriaan van Os via fpc-pascal wrote:

>
> I am looking at the implementation of POpen and PClose in the runtime-library 
> for Darwin (or more general for UNIX). It seems like it doesn't call into 
> libc popen and pclose, but instead follows its own implementation in unix.pp 
> in POpen_internal. I am just curious to know the reason.

- Because on linux we're independent of libc.
- IIRC the libc version uses the C FILE type, which is not compatible with
   the file descriptor we use elsewhere. Introducing that would require lots
   of wiring to handle both paths.

Michael.
_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal