Commit 5aa7f46a authored by Jim Blandy's avatar Jim Blandy

* emacs.c (emacs_priority): Doc fix.

	(main): Use nice, not setpriority; we just need a
	simple, portable call to nice here.
parent 4f0b9d49
...@@ -74,7 +74,9 @@ Lisp_Object Vsystem_type; ...@@ -74,7 +74,9 @@ Lisp_Object Vsystem_type;
but instead should use the virtual terminal under which it was started */ but instead should use the virtual terminal under which it was started */
int inhibit_window_system; int inhibit_window_system;
/* If nonzero, set Emacs to run at this priority. */ /* If nonzero, set Emacs to run at this priority. This is also used
in child_setup and sys_suspend to make sure subshells run at normal
priority; Those functions have their own extern declaration. */
int emacs_priority; int emacs_priority;
#ifdef HAVE_X_WINDOWS #ifdef HAVE_X_WINDOWS
...@@ -303,7 +305,7 @@ main (argc, argv, envp) ...@@ -303,7 +305,7 @@ main (argc, argv, envp)
#ifdef PRIO_PROCESS #ifdef PRIO_PROCESS
if (emacs_priority) if (emacs_priority)
setpriority (PRIO_PROCESS, getpid (), emacs_priority); nice (emacs_priority);
setuid (getuid ()); setuid (getuid ());
#endif /* PRIO_PROCESS */ #endif /* PRIO_PROCESS */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment