Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun do-shell (command)
- (with-temp-buffer
- (let ((proc (make-process
- :name "bash"
- :command `("/bin/bash" "-c" ,command)
- :buffer (current-buffer)
- :connection-type nil)))
- (while (process-live-p proc)
- (accept-process-output proc)))
- (buffer-string)))
- (make-thread (lambda ()
- (setf result
- (list (do-shell "sleep 5")
- (do-shell "ping -c 5 www.google.com")
- (do-shell "host www.microsoft.com")))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement