Finally the pid thing is working