48 si_close(pc[1]); si_close(cp[0]);
52 int r=system(
l->name);
61 si_close(pc[0]); si_close(cp[1]);
62 d->
f_read=fdopen(cp[0],
"r");
70 Werror(
"fork failed (%d)",errno);
101 if (unidirectional && (d->
pid!=0))
102 { kill(d->
pid,15); kill(d->
pid,9); }
127 char *ss=fgets(
s,1024,d->
f_read);
130 if ((
i>=0) && (
s[
i]==
'\n'))
s[
i]=
'\0';
151 fprintf(outfile,
"%s\n",
s);
156 WerrorS(
"cannot convert to string");
170 if (d==
NULL)
return "not open";
171 if(strcmp(request,
"read") == 0)
191 case 0:
return "not ready";
192 case -1:
return "error";
193 default:
return "ready";
196 else if (strcmp(request,
"write") == 0)
201 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)
if(!FE_OPT_NO_SHELL_FLAG)(void) system(sys)
#define omFreeSize(addr, size)
static BOOLEAN pipeOpen(si_link l, short flag, leftv)
EXTERN_VAR si_link pipeLastLink
static const char * slStatusPipe(si_link l, const char *request)
si_link_extension slInitPipeExtension(si_link_extension s)
static BOOLEAN pipeKill(si_link l)
static leftv pipeRead1(si_link l)
static BOOLEAN pipeClose(si_link l)
static BOOLEAN pipeWrite(si_link l, leftv data)
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)