---
st.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/st.c b/st.c
index 0204b2e..adf0b62 100644
--- a/st.c
+++ b/st.c
_AT_@ -1298,8 +1298,7 @@ ttynew(void) {
if (opt_line) {
if((cmdfd = open(opt_line, O_RDWR)) < 0)
die("open line failed: %s\n", strerror(errno));
- close(STDIN_FILENO);
- dup(cmdfd);
+ dup2(cmdfd, STDIN_FILENO);
stty();
return;
}
--
1.8.4
Received on Tue Apr 21 2015 - 20:55:40 CEST
This archive was generated by hypermail 2.3.0 : Tue Apr 21 2015 - 21:00:11 CEST