summaryrefslogtreecommitdiffstats
path: root/src/cmd/sam/unix.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-12-28 01:45:05 +0000
committerrsc <devnull@localhost>2004-12-28 01:45:05 +0000
commit22c7ebffdade6036f5b46347f6a6ca41023c6253 (patch)
tree78841d3f6de1a3231dcb9abf459136472a92bed5 /src/cmd/sam/unix.c
parent7ffc5208a82cd7339c125956a9702ac08c0ff2f4 (diff)
downloadplan9port-22c7ebffdade6036f5b46347f6a6ca41023c6253.tar.gz
plan9port-22c7ebffdade6036f5b46347f6a6ca41023c6253.zip
more little compile fixes
Diffstat (limited to 'src/cmd/sam/unix.c')
-rw-r--r--src/cmd/sam/unix.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/cmd/sam/unix.c b/src/cmd/sam/unix.c
index 162ba74f..2505f854 100644
--- a/src/cmd/sam/unix.c
+++ b/src/cmd/sam/unix.c
@@ -177,16 +177,20 @@ tempdisk(void)
return fd;
}
-#undef wait
+#undef waitfor
int
-waitfor(int pid)
+samwaitfor(int pid)
{
- int wm;
- int rpid;
-
- do; while((rpid = wait(&wm)) != pid && rpid != -1);
- return (WEXITSTATUS(wm));
-}
+ int r;
+ Waitmsg *w;
+
+ w = p9waitfor(pid);
+ if(w == nil)
+ return -1;
+ r = atoi(w->msg);
+ free(w);
+ return r;
+}
void
samerr(char *buf)