I would like to check if my shell is running ssh or not by checking the process name. I tried to get the process name by:
(let* ((proc (get-process "shell")) (proc-child-id (process-running-child-p proc))) (if proc-child-id (message (process-name proc-child-id))))
But it doesn't work because
process-name expect a PROCESS instead of PID. How can I get PROCESS from PID? Or how can I get the child process name directly?