On Wed, Sep 26, 2012 at 10:31:33 +0200, Jiri Moskovcak wrote:
@@ -718,6 +740,11 @@ static int create_pidfile()
if (lockf(fd, F_TLOCK, 0) < 0)
{
perror_msg("Can't lock file '%s'", VAR_RUN_PIDFILE);
+ /* should help with problems like rhbz#859724 */
+ pid_t locking_pid = get_locking_pid();
+ if (locking_pid > 0)
+ error_msg("Process: '%s (%u)' is holding the lock",
get_cmdline(locking_pid), locking_pid);
+
The memory allocated by get_cmdline is not freed, don't know how serious
issue that is. Otherwise the patch looks good and works for me.
Martin