Created
November 23, 2011 14:06
-
-
Save syohex/1388740 to your computer and use it in GitHub Desktop.
kill process which runs too long time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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