emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error in server-running-p on M$


From: Juanma Barranquero
Subject: Re: error in server-running-p on M$
Date: Fri, 12 Dec 2008 01:40:10 +0100

On Thu, Dec 11, 2008 at 19:47, Stefan Monnier <address@hidden> wrote:

> I didn't mean to leave the comment as is.  Please update the comment to
> say that the file *should* be ours thanks to the server-wunning-p check
> in server-start.

I was trying to weasel out of writing it, but you caught me ;-)

>> -     ;; Remove any leftover socket or authentication file.
>
> You've moved the subsequent line but left out this comment that goes
> with it.

It was not an oversight, I didn't think it was needed. I've moved it, though.

> This should first stop our own server.  The user will usually not run
> it when our server is running, but she might do it occasionally.

I've done that, and now I still dislike `server-force-delete' even
more. I strongly think that a simple question on server-start would
have been cleaner.

Currently the function must do

  (server-mode -1)  ;; which deletes the connection file, because of
the process sentinel
  (condition-case nil
      (delete-file ...)
      ...)

which is kind of redundant. It almost should be

  (if server-mode
       (server-mode -1)
     (condition-case nil
         ...))

but the name of the current server could be different of the one for
the connection file we're trying to delete.

Ugly IMHO.

>> +         (or (and (looking-at "127\.0\.0\.1:[0-9]+ \\([0-9]+\\)")
>> +                  (assq 'comm
>> +                        (system-process-attributes
>> +                         (string-to-number (match-string 1))))
>
>                     t)

Yes, a silly oversight. Thanks.

The code is now committed.

    Juanma




reply via email to

[Prev in Thread] Current Thread [Next in Thread]