Friday, August 19, 2016

read of 0 byte file



What will happen if you read a file with 0 bytes?

say cat /dev/null > file

do a read on the file - what it should return -
So you expect error ??

nope!!


It returns zero, which is success for read but no buffer is stored.



I had some tough time debugging this one.

So, Aware & Beware of this :)

No comments:

Post a Comment