"stat" problem, follow up

Hsuan Chang hsc at vuse.vanderbilt.edu
Tue Dec 13 15:54:29 AEST 1988


Hi, folks.  Remember I was pleaing for help about the system call "stat"
problem?  Well, I blamed the wrong one (my appology to the community).
But the situation has gotten worse. 

I searched, with helps from my co-workers, and found that the problem was
with the system call "open".  (sounds odd, isn't it.)  Before the program
reaches the stat (well, fstat(fd, &buf) to be accurate) it does an "fopen"
and an "open" on the same file, and that's where the truncation takes
place.  Further studies with RTFM revealed nothing but that you can call
"open" with only the file name as the argument, not as the what the manual
says! (I called it with "r" though).  After I had a few files truncated to
zeroes I decided to quit working on this.

Would any one of you like to try to find out what's going on?  Let me know
your findings.  Thanks.

Hsuan Chang
Image Processing Lab
Computer Science Dept
Vanderbilt University, Nashville, Tn 37235
(615) 322-0962
hsc
hsc at vuse.vanderbilt.edu



More information about the Comp.sys.sun mailing list