On 09/26/2012 12:57 PM, Martin Milata wrote:
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.
- good point, I think it's better to free it even though the daemon is
going to die, because we might change it in the future and easily forgot
about this "laziness"
- please see the next version of the patch
Martin