#+begin_src elisp

(defun kill-proc (proc)

"Kill process PROC identified by its PID or name."

(if (string-match-p "^[0-9]+$" proc)

(shell-command (format "kill -9 %s" proc))

(shell-command (format "pkill -9 %s" proc))))

(kill-proc "vim")

#+end_src

Reply to this note

Please Login to reply.

Discussion

No replies yet.