22 #include <sys/types.h>
49 si_close(pc[1]); si_close(cp[0]);
62 si_close(pc[0]); si_close(cp[1]);
63 d->
f_read=fdopen(cp[0],
"r");
71 Werror(
"fork failed (%d)",errno);
102 if (unidirectional && (d->
pid!=0))
103 { kill(d->
pid,15); kill(d->
pid,9); }
128 char *ss=fgets(
s,1024,d->
f_read);
131 if ((
i>=0) && (
s[
i]==
'\n'))
s[
i]=
'\0';
152 fprintf(outfile,
"%s\n",
s);
157 WerrorS(
"cannot convert to string");
171 if (d==
NULL)
return "not open";
172 if(strcmp(request,
"read") == 0)
192 case 0:
return "not ready";
193 case -1:
return "error";
194 default:
return "ready";
197 else if (strcmp(request,
"write") == 0)
202 return "unknown status request";
Class used for (list of) interpreter objects.
char * String(void *d=NULL, BOOLEAN typed=FALSE, int dim=1)
Called for conversion to string (used by string(..), write(..),..)
const CanonicalForm int s
void WerrorS(const char *s)
#define omFreeSize(addr, size)
LINKAGE BOOLEAN pipeKill(si_link l)
LINKAGE leftv pipeRead1(si_link l)
si_link_extension slInitPipeExtension(si_link_extension s)
LINKAGE BOOLEAN pipeClose(si_link l)
LINKAGE BOOLEAN pipeWrite(si_link l, leftv data)
BOOLEAN pipeOpen(si_link l, short flag, leftv)
const char * slStatusPipe(si_link l, const char *request)
void Werror(const char *fmt,...)
BOOLEAN slOpen(si_link l, short flag, leftv h)
#define SI_LINK_W_OPEN_P(l)
leftv(* slRead2Proc)(si_link l, leftv a)
#define SI_LINK_SET_R_OPEN_P(l)
#define SI_LINK_SET_CLOSE_P(l)
#define SI_LINK_R_OPEN_P(l)
#define SI_LINK_SET_RW_OPEN_P(l)
#define SI_LINK_OPEN_P(l)