[lug] Linux syscall 19 lseek() produces unexpected output

D. Stimits stimits at comcast.net
Tue Oct 30 17:57:47 MDT 2007


Carl Hamlin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Lori Reed wrote:
>   
>> Your file is being truncated to a length of 0 (zero).
>>     
>
> Very likely, but the problem also occurs when I use open(). Originally,
> I was having it check for the file's existence, and if it was already
> there, use open() instead of creat(). Same behavior.
>   

What kernel system calls show up at the end of strace? Don't know if 
you're familiar with strace, but it has a C-like syntax and gives a 
pretty good idea of what the kernel is thinking. Often a return of 0 
means success. The most interesting output will be at the end. You'll 
get a lot of failures of default path searches, but this isn't really an 
error. On the other hand, the actual problem tends to become obvious 
since you already know what it revolves around...a particular file.

D. Stimits, stimits AT comcast DOT net



More information about the LUG mailing list