[fpc-pascal] fcl-process, SimpleIPC and pipes

Michael Van Canneyt michael at freepascal.org
Tue Oct 8 10:14:00 CEST 2013



On Tue, 8 Oct 2013, Juha Manninen wrote:

> I must implement communication between 2 processes.
> I believe SimpleIPC is good for that purpose and it is well tested in
> a cross-platform system (Lazarus <-> ChmHelp).
>
> Named pipes were suggested to me. I would like to know the benefits /
> handicaps of SimpleIPC compared to named pipes. I will have to answer
> such questions myself soon.

The semantics of named pipes are rather different on Windows and Unix.
I would not recommend them for cross-platform implementations.

>
> fcl-process also has pipes unit and then "pipesipc" which apparently
> does not use pipes. (?)

These pipes are different from named pipes. This is simply 2 file descriptors. 
What is written to the first, can be read from the other. You need 3 such pipes 
to be able to redirect stdin/stdout/stderr between processes.

Michael.



More information about the fpc-pascal mailing list