#include "apue.h"int main(){ int flag=lseek(STDIN_FILENO,0,SEEK_CUR); if(flag==-1) { printf("can't seek\n"); } else { printf("seek ok\n"); printf("%d\n",flag); } return 0;}
测试证明,lseek()返回为0,即文件的偏移值默认为0
posted on 2012-10-16 21:53 追寻前人的脚步 阅读(179) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 追寻前人的脚步 Powered by .NET 8.0 on Kubernetes