if(lseek(STDIN_FILENO,0,SEEK_CUR)==-1) printf("can't seek"); else printf("seek ok"); off_t lseek(int fileds,off_t offset,int whence)
whence: SEEK_SET SEEK_CUR SEEK_END
某些设备lseek返回值为负值,所以测试的时候应该小心,不要测试是否小于0,测试是否为-1
Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com
2019年3月26日 08:11
This is a very interesting post and I have learned so much by going through it.