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:
parent
72e13bfb97
commit
41f1be05da
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user