C语言中的NOFILE代表什么?
c语言吧
全部回复
仅看楼主
level 5
Freedom_战戮
楼主
网上找了段代码,没看他对NOFILE进行宏定义,就直接用了。。。我照抄之后。。。就在NOFILE报错了
2014年12月10日 07点12分
1
level 5
Freedom_战戮
楼主
void process(void){
int pid;
int i;
if (pid=fork()){
exit(0);
}
else{
if (pid<0){
exit(1);
}
setsid();
for (i=0;i<NOFILE;++i){
close(i);
chdir("/temp");
umask(0);
return;
}
}
}
2014年12月10日 07点12分
2
level 5
Freedom_战戮
楼主
求教
2014年12月10日 08点12分
3
1