This patch stop a failed port-information-file deletion from
preventing slime to proceed with connection to swank.
This helps to smooth the sbcl-suid workflow, when the setuid
instance of sbcl creates a file which is then un-deleteable
by slime running in an insufficiently privileged emacs process.
regards, Samium Gromoff
diff -urN slime-old/slime.el slime/slime.el
--- slime-old/slime.el 2007-01-31 19:18:11.000000000 +0300
+++ slime/slime.el 2007-02-02 01:20:41.000000000 +0300
@@ -1596,7 +1596,9 @@
(defun slime-inferior-connect (process args)
"Start a Swank server in the inferior Lisp and connect."
(when (file-regular-p (slime-swank-port-file))
- (delete-file (slime-swank-port-file)))
+ (condition-case nil
+ (delete-file (slime-swank-port-file))
+ (error nil)))
(slime-start-swank-server process args)
(slime-read-port-and-connect process nil))
@@ -1662,7 +1664,9 @@
(cond ((file-exists-p (slime-swank-port-file))
(let ((port (slime-read-swank-port))
(args (slime-inferior-lisp-args process)))
- (delete-file (slime-swank-port-file))
+ (condition-case nil
+ (delete-file (slime-swank-port-file))
+ (error nil))
(let ((c (slime-connect slime-lisp-host port
(plist-get args :coding-system))))
(slime-set-inferior-process c process))))