I have a process that is currently running with pid, $PID, and owned by the user foo which is not root. I want to transfer the ownership of this process to another user bar which is also not root.
Is there a shell command that changes the owner of a process? I'm thinking of a chown but for processes that looks something like.
chownproc [option] PID
This question and this question are similar, but not quite what I'm looking for and chown man pages doesn't say anything about processes, only files.
If there isn't, is there a reason why this hasn't been done or isn't possible?