aboutsummaryrefslogtreecommitdiff
path: root/src/lib9
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib9')
-rw-r--r--src/lib9/getenv.c1
-rw-r--r--src/lib9/mkfile3
-rw-r--r--src/lib9/pipe.c5
3 files changed, 8 insertions, 1 deletions
diff --git a/src/lib9/getenv.c b/src/lib9/getenv.c
index 2a2d1391..384196cf 100644
--- a/src/lib9/getenv.c
+++ b/src/lib9/getenv.c
@@ -22,6 +22,5 @@ p9putenv(char *s, char *v)
if(t == nil)
return -1;
putenv(t);
- free(t);
return 0;
}
diff --git a/src/lib9/mkfile b/src/lib9/mkfile
index 7824ff18..d388d224 100644
--- a/src/lib9/mkfile
+++ b/src/lib9/mkfile
@@ -107,6 +107,8 @@ LIB9OFILES=\
getuser.$O\
getwd.$O\
jmp.$O\
+ lrand.$O\
+ lnrand.$O\
lock.$O\
main.$O\
malloc.$O\
@@ -119,6 +121,7 @@ LIB9OFILES=\
nrand.$O\
nulldir.$O\
open.$O\
+ opentemp.$O\
pipe.$O\
post9p.$O\
postnote.$O\
diff --git a/src/lib9/pipe.c b/src/lib9/pipe.c
index f9fe2420..01b244ef 100644
--- a/src/lib9/pipe.c
+++ b/src/lib9/pipe.c
@@ -3,6 +3,11 @@
#include <libc.h>
#include <sys/socket.h>
+/*
+ * We use socketpair to get a two-way pipe.
+ * The pipe still doesn't preserve message boundaries.
+ * Worse, it cannot be reopened via /dev/fd/NNN on Linux.
+ */
int
p9pipe(int fd[2])
{