Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

plan9port and procexecl

1 view
Skip to first unread message

Dmitry Golubovsky

unread,
Jan 4, 2010, 4:43:59 AM1/4/10
to
Hi,

I have a piece of code which compiles and works fine in Plan9:

================================================

void
execproc(void *v)
{
Channel *sync;
Exec *e;
int q[2];
char *cmd;

threadsetname("execproc");
e = v;
q[0] = e->q[0];
q[1] = e->q[1];
cmd = e->cmd;
sync = e->sync;
rfork(RFFDG);
free(e);
if(q[0]){
dup(q[1], 1);
close(q[0]);
close(q[1]);
}
procexecl(sync, "/bin/rc", "rc", "-c", cmd, 0);
sysfatal("can't exec");
}

================================================

(partly stolen from abaco, it runs a command in a proc and pipes the
output).

In plan9port the compiler complains for undefined procexecl, and the
linker fails.

What would be the closest analog of procexecl for plan9port?

Thanks.

0 new messages