ref: fcf4838dbaf44d5cb8b00e417172208dc3ee5382
parent: 3c7e3e2395b2f3c4c3e0199c1f5153b75993949c
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Oct 15 06:44:40 EDT 2020
don't close fd 2 when calling mcfs
--- a/stream_mc.c
+++ b/stream_mc.c
@@ -11,7 +11,7 @@
static int
mcfs(char **argv, int *pipefd)
{
- int p[2], pid, fd;
+ int p[2], pid;
pipe(p);
if((pid = rfork(RFFDG|RFPROC)) == 0){
@@ -18,10 +18,6 @@
close(0);
close(p[0]);
dup(p[1], 1); close(p[1]);
- if(!debug){
- dup(fd = open("/dev/null", OWRITE), 2);
- close(fd);
- }
exec("/bin/mcfs", argv);
sysfatal("exec: %r");
}