success on the sun
diff --git a/src/lib9/post9p.c b/src/lib9/post9p.c
index ddedf62..44c0943 100644
--- a/src/lib9/post9p.c
+++ b/src/lib9/post9p.c
@@ -10,6 +10,7 @@
 
 	if((ns = getns()) == nil)
 		return -1;
+
 	s = smprint("unix!%s/%s", ns, name);
 	free(ns);
 	if(s == nil)
@@ -27,6 +28,8 @@
 		_exits("exec");
 	default:
 		w = wait();
+		if(w == nil)
+			return -1;
 		close(fd);
 		free(s);
 		if(w->msg && w->msg[0]){