Bug 842575 - correctly kill the application when pushing a new version r=julienw a=npotb

Correctly find the pid
(cherry picked from commit bff669dbccd14042930ac6ac99063e3d36ec0dfd)