#include "apue.h"
int main(void )
{
if (lseek(STDIN_FILENO,0,SEEK_CUR) == -1 )
printf("can not seek \n");
else
printf("seek ok \n");
exit(0);
}
/*
* test wether or not to set the offset of the stdin
* Note when you compare the return code of the lseek function
* ./a.out
* can not seek
*/
阅读(838) | 评论(0) | 转发(0) |