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))))
Samium Gromoff _deepfire@feelingofgreen.ru writes:
This patch stop a failed port-information-file deletion from preventing slime to proceed with connection to swank.
applied (though i added a warning message). tell me if the patch, as applied, works for you.
At Fri, 02 Feb 2007 12:48:38 +0100, Marco Baringer wrote:
Samium Gromoff _deepfire@feelingofgreen.ru writes:
This patch stop a failed port-information-file deletion from preventing slime to proceed with connection to swank.
applied (though i added a warning message). tell me if the patch, as applied, works for you.
thanks, it does!
although there seem to be no warning message in my *Messages* after three slime-restart-inferior-lisp invocations:
slime.elc is older than source. Recompile first? (y or n) Compiling /home/deepfire/exports/asdf/slime/slime.el...done Wrote /home/deepfire/exports/asdf/slime/slime.elc Loading /home/deepfire/exports/asdf/slime/slime.elc (compiled; note, source file is newer)...done Polling "/tmp/slime.9579".. (Abort with `M-x slime-abort-connection'.) [45 times] Connecting to Swank on port 45445.. T Connected. Take this REPL, brother, and may it serve you well.
Polling "/tmp/slime.9579".. (Abort with `M-x slime-abort-connection'.) [8 times] Connecting to Swank on port 37061.. T Connected. May the source be with you! Polling "/tmp/slime.9579".. (Abort with `M-x slime-abort-connection'.) [5 times] Connecting to Swank on port 59216.. T Connected. Hack and be merry!
-- -Marco Ring the bells that still can ring. Forget your perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen
regards, Samium Gromoff