aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/timer.el
diff options
context:
space:
mode:
authorJim Blandy <[email protected]>1993-04-01 01:07:38 +0000
committerJim Blandy <[email protected]>1993-04-01 01:07:38 +0000
commit77328ee1d334aa0cf2c3ca9990c6fa568d5d02fa (patch)
treeb7ee91adb36cb19185193df2e75fadd48be655b4 /lisp/timer.el
parent9d0f559a4d165fca10ebb0b202f382c34adb1fb5 (diff)
* timer.el (timer-program): New defconst.
(run-at-time): Use timer-program as the name of the program the subprocess should run, and search for it in exec-directory, rather than checking the entire exec path.
Diffstat (limited to 'lisp/timer.el')
-rw-r--r--lisp/timer.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/timer.el b/lisp/timer.el
index 62d13f1162..e63f77defa 100644
--- a/lisp/timer.el
+++ b/lisp/timer.el
@@ -28,6 +28,10 @@
;;; Code:
+;;; The name of the program to run as the timer subprocess. It should
+;;; be in exec-directory.
+(defconst timer-program "timer")
+
(defvar timer-process nil)
(defvar timer-alist ())
(defvar timer-out "")
@@ -63,8 +67,12 @@ Relative times may be specified as a series of numbers followed by units:
(cond ((or (not timer-process)
(memq (process-status timer-process) '(exit signal nil)))
(if timer-process (delete-process timer-process))
- (setq timer-process (let ((process-connection-type nil))
- (start-process "timer" nil "timer"))
+ (setq timer-process
+ (let ((process-connection-type nil))
+ ;; Don't search the exec path for the timer program;
+ ;; we know exactly which one we want.
+ (start-process (expand-file-name timer-program exec-directory)
+ nil "timer"))
timer-alist nil)
(set-process-filter timer-process 'timer-process-filter)
(set-process-sentinel timer-process 'timer-process-sentinel)