Skip to content

Instantly share code, notes, and snippets.

@mtm
Created November 1, 2011 22:33
Show Gist options
  • Save mtm/1332167 to your computer and use it in GitHub Desktop.
Save mtm/1332167 to your computer and use it in GitHub Desktop.
(defun port-availablep (port)
(condition-case nil
(let ((p (make-network-process :name "port-checker" :buffer nil :host "localhost" :service port)))
(delete-process p))
(file-error t)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment