Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-10

fcl-process, SimpleIPC and pipes

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Juha Manninen

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.

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

Juha

Michael Van Canneyt
to Juha Manninen
Juha Manninen wrote 7 lines
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.

Mark Morgan Lloyd
to Juha Manninen: I must implement communication between 2 processes. I believe SimpleIPC is good for that…
Juha Manninen wrote 10 lines
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. fcl-process also has pipes unit and then "pipesipc" which apparently does not use pipes. (?)

The semantics of names pipes varies across different OSes. I've used the unix equivalent on Linux for the specific reason that I wanted to explore issues of naming etc., but porting to Windows turned out to be problematic despite my having used the MS/IBM variant in the past.

Use SimpleIPC unless you have an informed reason not to.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]