lockfile-create --use-pid uses wrong pid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lockfile-progs (Debian) |
Fix Released
|
Unknown
|
|||
lockfile-progs (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: lockfile-progs
It uses L_PID which puts the PID of the lockfile-create process in the lock.
It needs to use the L_PPID (2 places) to put the process id of the process
executing lockfile-create.
diff -c lockfile-
*** lockfile-
--- lockfile-progs.c 2010-11-17 13:58:11.093167970 -0800
***************
*** 328,334 ****
static int
cmd_lock(const char *lockfilename, int retry_count)
{
! int rc = lockfile_
const char *rc_str = get_status_
if(rc != L_SUCCESS)
--- 328,334 ----
static int
cmd_lock(const char *lockfilename, int retry_count)
{
! int rc = lockfile_
const char *rc_str = get_status_
if(rc != L_SUCCESS)
***************
*** 363,369 ****
static int
cmd_check(const char *lockfilename)
{
! int rc = lockfile_
return rc;
}
--- 363,369 ----
static int
cmd_check(const char *lockfilename)
{
! int rc = lockfile_
return rc;
}
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: lockfile-progs 0.1.15
ProcVersionSign
Uname: Linux 2.6.35-22-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Wed Nov 17 14:10:46 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007.1)
ProcEnviron:
PATH=(custom, user)
LANG=en_US.utf8
SHELL=
SourcePackage: lockfile-progs
Changed in lockfile-progs (Debian): | |
status: | Unknown → New |
Changed in lockfile-progs (Debian): | |
status: | New → Fix Released |
Definitely. Without this change lockfile-create is useless, as it succeeds every time.