The documentation for sysread says that it returns 0 on EOF.
In reply to Re: is 0 bytes read EOF ? by GrandFather in thread is 0 bytes read EOF ? by abachus