aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-10-29 15:39:40 +0000
committerRon Yorston <rmy@pobox.com>2024-10-29 15:39:40 +0000
commite5beafdf959f0642c226483a16c0a58c4aedba37 (patch)
tree5f6c2d8ec853b0deb133e81fc9dc82b836c7a857
parentbed407a12630c0886532b4b2d54dbedd74d52d98 (diff)
downloadbusybox-w32-e5beafdf959f0642c226483a16c0a58c4aedba37.tar.gz
busybox-w32-e5beafdf959f0642c226483a16c0a58c4aedba37.tar.bz2
busybox-w32-e5beafdf959f0642c226483a16c0a58c4aedba37.zip
win32: try harder to prevent output to stdout
The previous commit failed to stop 'uname 1>&-' from writing to standard output with 32-bit MSVCRT. Close the stream _and_ the file descriptor. (Github issue #472)
-rw-r--r--shell/ash.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index a5b7dbc74..5768b6d71 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6643,7 +6643,6 @@ redirect(union node *redir, int flags)
6643 fclose(stdout); 6643 fclose(stdout);
6644 else if (fd == fileno(stderr)) 6644 else if (fd == fileno(stderr))
6645 fclose(stderr); 6645 fclose(stderr);
6646 else
6647#endif 6646#endif
6648 close(fd); 6647 close(fd);
6649 } 6648 }