After I examin again, I find out that I open file as "O_RDONLY". Refer to Linux's man page, there is a section to discript it:
Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a subsequent read blocks.
Hence, I modify open statement from myfd = open("/tmp/a", O_RDONLY) to myfd = open("/tmp/a", O_RDWR|O_NONBLOCK). Everything is perfect right.