Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1752235
  • 博文数量: 335
  • 博客积分: 4690
  • 博客等级: 上校
  • 技术积分: 4341
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 21:38
个人简介

无聊之人--除了技术,还是技术,你懂得

文章分类

全部博文(335)

文章存档

2016年(29)

2015年(18)

2014年(7)

2013年(86)

2012年(90)

2011年(105)

分类: C/C++

2012-01-03 11:41:55

#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
 */

阅读(686) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~