Query regarding buffering in streams
I could able to do the follwoing thing in linux, aix but not in IRIX.
cat testfile.dat | testprog
testfile.dat is the input to testprog.
testprog could able to get all the input properly in Linux without using setbuf in "testprog"but failed in IRIX. So when I used
setbuf(stdin, NULL) in "testprog" where I am opening stdin explicitly it worked well. Can anyone explain me what is going on explaining me the usage of setbuf, setvbuf with clear understanding using streams. I jst hve a vague idea and made it work.