This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Question about fcntl64
- From: "Hongzhi, Song" <hongzhi dot song at windriver dot com>
- To: <libc-help at sourceware dot org>
- Date: Wed, 12 Sep 2018 22:23:26 +0800
- Subject: Question about fcntl64
Hi all,
I met a problem with one of ltp testcase, fcntl34, on qemux86.
Testcase source code: ltp/testcases/kernel/syscalls/fcntl/fcntl34.c
In function 'thread_fn_01', struct flock64 lck.l_len is set '1'.
thread_fn_01 ---> SAFE_FCNTL(fd, F_OFD_SETLKW, &lck) ---> fcntl64
But I used 'strace -f ./fcntl34' to trace 'fcntl64' syscall, I found
that 'lck.l_len'
is set '0'.
The result of strace: note "---> <---"
fcntl64(6, F_OFD_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0,
--- > l_len=0 <---}
I can't find that where dose l_len is set '0'.
So, can someone tell me than why l_len is change to '0' which is set '1'
previously.
Thanks,
--Hongzhi