RE:CINT and Pipes

Masaharu Goto (MXJ02154@nifty.ne.jp)
Thu, 06 May 1999 21:10:50 +0900


Dear Jeff Patterson,

> Does anybody know if CINT supports the standard C pipes to the
>operating system ?
> FILE_PT = popen("ls", "r")
>Statements like that ?

In default configuration, CINT only supports what is included in ANSI.
popen and pclose appeared in Version 7 AT&T UNIX but not included in ANSI.
These are not included in CINT by default.

But you can always add such function by makecint or rootcint.

// mypipe.h
FILE *popen(const char *command,const char *type);
int pclose(FILE *stream);
// end of mypipe.h file

$ makecint -mk makepipe -dl pipe.dll -h mypipe.h
$ make -f makepipe
$ cint
cint> L pipe.dll
cint> .
cint> FILE* FILE_PT = popen("ls","r");
(FILE*)0x8215330
cint>

So you can support it by yourself.

Thank you
Masaharu Goto