Re: confusion on fopen()/falloc()

2005-02-26 Thread John-Mark Gurney
Yan Yu wrote this message on Sat, Feb 26, 2005 at 01:10 -0800: > Hello, all, > I have a user program as below: > FILE *fd; > while (1) > { > fd= fopen( "tmp", "r" ); > if ( fd == NULL ) > break; > } > > from my understanding, since i open the same file to read, my process

Re: confusion on fopen()/falloc()

2005-02-26 Thread Yan Yu
On Sat, 26 Feb 2005, Yan Yu wrote: > Hello, all, > I have a user program as below: > FILE *fd; > while (1) > { > fd= fopen( "tmp", "r" ); > if ( fd == NULL ) > break; > } > > from my understanding, since i open the same file to read, my process > should create a new file

confusion on fopen()/falloc()

2005-02-26 Thread Yan Yu
Hello, all, I have a user program as below: FILE *fd; while (1) { fd= fopen( "tmp", "r" ); if ( fd == NULL ) break; } from my understanding, since i open the same file to read, my process should create a new file descriptor each time when fopen is called. Therefore,