13
int C2Lopen (char *name, char *mode, FILE **ifp, FILE **ofp) {
16
if ((fd = csopen (name, CS_OPEN_READ)) == -1)
18
fcntl (fd, F_SETFD, FD_CLOEXEC);
19
*ifp = fdopen (fd, "r"), *ofp = fdopen (fd, "a+");
24
int C2Lreadcsmessage (int argc, lvar_t *argv) {
26
#if 0 /* not finished yet */
33
ioi = Tgetnumber (argv[0].o);
34
if (ioi < 0 || ioi >= ion)
38
fseek (p->ofp, 0L, 1);
39
if ((n = msgrecv (fileno (p->ifp), &msg)) <= 0)
43
Tinss (to, "id", Tinteger (MSG_CHANNEL_USR (msg.channel)));
44
Tinss (to, "pid", Tinteger (MSG_CHANNEL_SYS (msg.channel)));