shithub: riscv

Download patch

ref: b9745c60a1bf2a3876e411d38c67a0980d70e3a3
parent: 62bedca19fbf3305f00b3d8f58496fb45f4ad2b8
parent: 116b075371ec9a8af831e142f194a7a4a2fa738a
author: aiju <[email protected]>
date: Sun Jan 20 07:55:31 EST 2019

merge

--- a/sys/src/cmd/rc/plan9.c
+++ b/sys/src/cmd/rc/plan9.c
@@ -93,9 +93,14 @@
 	if(rfork(arg)==-1){
 		pfmt(err, "rc: %s failed\n", runq->argv->words->word);
 		setstatus("rfork failed");
-	}
-	else
+	} else {
+		if(arg & RFCFDG){
+			struct redir *rp;
+			for(rp = runq->redir; rp; rp = rp->next)
+				rp->type = 0;
+		}
 		setstatus("");
+	}
 	poplist();
 }