k9core

Unnamed repository
Log | Files | Refs | LICENSE

commit a43985bfdfaea01c90fbd249eb01fece7f4faf99
parent 1d78c2ccff34246288c8bede1f06cc8711f35b6b
Author: qorg11 <qorg@vxempire.xyz>
Date:   Thu,  8 Oct 2020 11:07:40 +0200

Holy cow, I added comments but I made another commit to k9core!

Diffstat:
Msrc/tee.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/tee.c b/src/tee.c @@ -31,8 +31,9 @@ main(int argc, char *argv[]) int append = 0; int ignore_signt = 0; int fd = 0; - int FLAGS = O_WRONLY; /* POSIX is a bit dumb, god knows why - this is not the same as O_RDWR */ + int FLAGS = O_WRONLY; /* yeah, it will overwrite the thing if it + * can't read what's in the file, thanks + * POSIX! */ while((c = getopt(argc, argv,"ai")) != -1) { switch(c) @@ -52,7 +53,7 @@ main(int argc, char *argv[]) if(argv[argc-1][0] == '-') fd = 1; if(append) - FLAGS = O_RDWR|O_APPEND; + FLAGS = O_RDWR|O_APPEND; /* Remember what I said? */ fd = open(argv[argc-1],FLAGS); if(ignore_signt)