aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1992-09-23 03:46:12 +0000
committerJim Blandy1992-09-23 03:46:12 +0000
commit5aa7f46a74510a4deac16c2ea5cde2f1d0fb04f6 (patch)
tree35fd1375d3e9b47892088b3ab32553ebe77cb021
parent4f0b9d499478e7f2726daba7a4d2f35b50ad3301 (diff)
downloademacs-5aa7f46a74510a4deac16c2ea5cde2f1d0fb04f6.tar.gz
emacs-5aa7f46a74510a4deac16c2ea5cde2f1d0fb04f6.zip
* emacs.c (emacs_priority): Doc fix.
(main): Use nice, not setpriority; we just need a simple, portable call to nice here.
-rw-r--r--src/emacs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c
index b5b88f74cbb..17698dfab9f 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -74,7 +74,9 @@ Lisp_Object Vsystem_type;
74 but instead should use the virtual terminal under which it was started */ 74 but instead should use the virtual terminal under which it was started */
75int inhibit_window_system; 75int inhibit_window_system;
76 76
77/* If nonzero, set Emacs to run at this priority. */ 77/* If nonzero, set Emacs to run at this priority. This is also used
78 in child_setup and sys_suspend to make sure subshells run at normal
79 priority; Those functions have their own extern declaration. */
78int emacs_priority; 80int emacs_priority;
79 81
80#ifdef HAVE_X_WINDOWS 82#ifdef HAVE_X_WINDOWS
@@ -303,7 +305,7 @@ main (argc, argv, envp)
303 305
304#ifdef PRIO_PROCESS 306#ifdef PRIO_PROCESS
305 if (emacs_priority) 307 if (emacs_priority)
306 setpriority (PRIO_PROCESS, getpid (), emacs_priority); 308 nice (emacs_priority);
307 setuid (getuid ()); 309 setuid (getuid ());
308#endif /* PRIO_PROCESS */ 310#endif /* PRIO_PROCESS */
309 311