Skip to content

Instantly share code, notes, and snippets.

@syohex
Created November 23, 2011 14:06
Show Gist options
  • Save syohex/1388740 to your computer and use it in GitHub Desktop.
Save syohex/1388740 to your computer and use it in GitHub Desktop.
kill process which runs too long time
(progn
(setq sleep-process (start-process "test" nil "sleep" "60"))
(run-at-time 5 nil (lambda ()
(when (eq (process-status sleep-process) 'run)
(kill-process sleep-process)
(message "kill process sleep")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment