generic/484: Need another process to check record locks
authorXiao Yang <yangx.jy@cn.fujitsu.com>
Mon, 21 May 2018 05:42:00 +0000 (13:42 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sat, 26 May 2018 08:59:16 +0000 (16:59 +0800)
commit69b7f3c4f7203ba8efe08c0408cab157f544f39b
treedfd2e108ce261d5b17cb243d7a818a25dc877526
parent8ee4d87d341994f95e96321dd56f0b25b549c0cb
generic/484: Need another process to check record locks

According to fcntl(2) manpage, A single process always gets F_UNLCK
in the l_type field when using fcntl(F_GETLK) to acquire the
existing lock set by itself because it could convert the existing
lock to a new lock unconditionally.  So we need another process to
check if the lock exists.

Also remove redundant exit(0).

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Xiong Zhou <xzhou@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
src/t_locks_execve.c