Use new pipe syscalls
This commit is contained in:
@ -120,8 +120,8 @@ bool rt_do(Token *tks) {
|
||||
StringBuffer outbuf;
|
||||
stringbuffer_init(&outbuf);
|
||||
|
||||
ipcpipe(PID, 10, IPCPIPE_MAKE, NULL, 0);
|
||||
ipcpipe(app, IPCPIPE_OUT, IPCPIPE_REPLACE, (uint8_t *)PID, 10);
|
||||
ipc_pipemake(10);
|
||||
ipc_pipeconnect(app, 0, PID, 10);
|
||||
|
||||
processctl(app, PCTL_RUN, 0, 0, 0);
|
||||
|
||||
@ -129,14 +129,14 @@ bool rt_do(Token *tks) {
|
||||
int32_t r;
|
||||
char buf[100];
|
||||
string_memset(buf, 0, sizeof(buf));
|
||||
|
||||
r = ipcpipe(app, IPCPIPE_OUT, IPCPIPE_READ, (uint8_t *)buf, sizeof(buf)-1);
|
||||
|
||||
r = ipc_piperead(app, 0, (uint8_t *const)buf, sizeof(buf)-1);
|
||||
if (r > 0) {
|
||||
stringbuffer_appendcstr(&outbuf, buf);
|
||||
}
|
||||
}
|
||||
|
||||
ipcpipe(PID, 10, IPCPIPE_DELETE, NULL, 0);
|
||||
ipc_pipedelete(10);
|
||||
|
||||
rtstringv_stackpushcopy(outbuf.data, outbuf.count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user