Sorry to I am not familiar with script writing ,
attach is the /etc/profile in my system , we have limit each user can only have one login in the system . When the user login , if the system found the user have a dead process in the system , the system will confirm the user to kill the previous login and try to kill it ( this is the additational function of the profile ) , but I have a problem now , the system can't kill the previous dead process now , I think it is because the system only try to kill the PID , but not the PPID ,so it will pop the "not the process owner" when trying to kill the process , could suggest how can I change the script so that it will kill the PPID ? or is there any reason why the dead can't be killed ? thx in advance.