Comment 4 for bug 1314500

Revision history for this message
Frank Cizmich (frank-cizmich) wrote :

Daniel,

The problem happens when the --daemonize option is used, and we have no permission to access to the PID file.

I reproduced it as follows (logged in as a regular user) :

> pt-kill --daemonize --busy-time 10 --kill --pid /var/run/percona-toolkit/pt-kill.pid -u xxxxx -p xxxxx
> Cannot open PID file /var/run/percona-toolkit/pt-kill.pid: No such file or directory at pt-kill line 2398.
> echo $?
> 0

After the fix the same command exits with error 1.

So, in essence, the process "successfully" forks, but child dies immediately for whatever reason. We now capture this by waiting a couple of seconds to see if it started correctly.