emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117098: * browse-url.el (browse-url-mosaic): Cre


From: Glenn Morris
Subject: [Emacs-diffs] emacs-24 r117098: * browse-url.el (browse-url-mosaic): Create /tmp/Mosaic.PID as a private file.
Date: Sat, 10 May 2014 20:48:42 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117098
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-05-10 13:48:36 -0700
message:
  * browse-url.el (browse-url-mosaic): Create /tmp/Mosaic.PID as a private file.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/browse-url.el         
browseurl.el-20091113204419-o5vbwnq5f7feedwu-1785
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-05-10 20:07:01 +0000
+++ b/lisp/ChangeLog    2014-05-10 20:48:36 +0000
@@ -1,3 +1,8 @@
+2014-05-10  Glenn Morris  <address@hidden>
+
+       * net/browse-url.el (browse-url-mosaic):
+       Create /tmp/Mosaic.PID as a private file.
+
 2014-05-10  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/nadvice.el: Support adding a given function multiple times.

=== modified file 'lisp/net/browse-url.el'
--- a/lisp/net/browse-url.el    2014-05-08 18:10:36 +0000
+++ b/lisp/net/browse-url.el    2014-05-10 20:48:36 +0000
@@ -1343,10 +1343,16 @@
                         "newwin\n"
                       "goto\n")
                     url "\n")
-            (if (file-exists-p (setq pidfile (format "/tmp/Mosaic.%d" pid)))
-                (delete-file pidfile))
-            ;; http://debbugs.gnu.org/17428.  Use O_EXCL.
-            (write-region nil nil pidfile nil 'silent nil 'excl))
+            (let ((umask (default-file-modes)))
+              (unwind-protect
+                  (progn
+                    (set-default-file-modes ?\700)
+                    (if (file-exists-p
+                         (setq pidfile (format "/tmp/Mosaic.%d" pid)))
+                        (delete-file pidfile))
+                    ;; http://debbugs.gnu.org/17428.  Use O_EXCL.
+                    (write-region nil nil pidfile nil 'silent nil 'excl))
+                (set-default-file-modes umask))))
          ;; Send signal SIGUSR to Mosaic
          (message "Signaling Mosaic...")
          (signal-process pid 'SIGUSR1)


reply via email to

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