k9core

Unnamed repository
Log | Files | Refs | LICENSE

commit 8f16928a591ac1b4432570aaf4034dc587932516
parent f4871118a45971814f8ae7a7b65156bb56d95a5b
Author: qorg11 <qorg@vxempire.xyz>
Date:   Wed,  9 Sep 2020 19:47:01 +0200

POSIX, I don't really get you sometimes...

Diffstat:
Msrc/tee.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/tee.c b/src/tee.c @@ -16,7 +16,11 @@ tee(int fd) char buf[8192]; int read_bytes = 0; while((read_bytes = read(0,buf,8192)) > 0) - write(fd,buf,read_bytes); + { + write(fd,buf,read_bytes); + if(fd != 1) + write(1,buf,read_bytes); + } return 1; }