Added ability to do ">/dev/stdout". The apsfilter people are anxious

to get it MFCed in time for release 4.5.

MFC after: 2 weeks
This commit is contained in:
Sergey Babkin 2001-12-22 02:40:58 +00:00
parent 72e13bfb97
commit 41f1be05da

View File

@ -145,11 +145,8 @@ again:
}
if (!try) {
sv->renamed[fd] = i;
close(fd);
}
INTON;
} else {
close(fd);
}
if (fd == 0)
fd0_redirected++;
@ -186,6 +183,7 @@ openredirect(redir, memory)
error("cannot open %s: %s", fname, errmsg(errno, E_OPEN));
movefd:
if (f != fd) {
close(fd);
copyfd(f, fd);
close(f);
}