[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] popen()/pclose() and the pipes?



Hi everybody,

A long time age, I ask some question about inter-processus communication. All I
wanted to do was to "pipe" some datas through several programs ("across" STDIN
and STDOUT).

The answer I got at that time to use popen() and pclose().

I saved the message on my HD in order not to loose that answer and now I'd like
to use it but...

What's these popen() and pclose()? These are no "standard" GEMDOS/MINT call but
C stuff.

I dug deep in the MiNT's docs I have, in man pages (some from MiNT, some from
Linux) and I finally landed in the sources of MiNT.

I have understood how to use popen()/pclose() theorically... but I need first to
translate them in some "pure" GEMDOS calls for GFA and what I found in
"/usr/include/stdio.h" didn't help me. I reached my limits in terms of C
knowledge.

Can somebody tell me how to replace popen()/pclose() with GEMDOS calls or, at
least, where theses procedures are *really* defined in the MiNT sources or more
likely in the GCC environment?

And what are the limits of the pipes? What happens when a program wants to send
MBytes of datas in a pipe if the receiver is just too slow to catch all this?

Will the sender be "locked" until the receiver reads all that was already sent?
Will datas be lost? Or what else? Will the whole pipe system explode?  ;-)

Hoping it will wake up that sleepy MiNT list...

=====================
Remi Villatel
maxilys@normandnet.fr
=====================