Time to import OpenBSD once again. Expect breakage.

This commit is contained in:
tg
2003-12-22 20:22:51 +00:00
parent 2bfc0acc6d
commit f7ecabd91c
24 changed files with 165 additions and 115 deletions

4
io.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: io.c,v 1.12 2003/03/10 03:48:16 david Exp $ */
/* $OpenBSD: io.c,v 1.13 2003/11/10 21:26:39 millert Exp $ */
/*
* shell buffered IO and formatted output
@ -321,7 +321,7 @@ restfd(fd, ofd)
shf_flush(&shf_iob[fd]);
if (ofd < 0) /* original fd closed */
close(fd);
else {
else if (fd != ofd) {
ksh_dup2(ofd, fd, TRUE); /* XXX: what to do if this fails? */
close(ofd);
}