diff options
author | Jim Blandy <[email protected]> | 1992-09-23 03:51:13 +0000 |
---|---|---|
committer | Jim Blandy <[email protected]> | 1992-09-23 03:51:13 +0000 |
commit | 1593c2fe369bca32b69b979430573dbc07a27caa (patch) | |
tree | e05880caebbd7e652fb3a0b85ab4c29d5f0398b7 /src | |
parent | 5aa7f46a74510a4deac16c2ea5cde2f1d0fb04f6 (diff) |
* sysdep.c (sys_suspend): Don't try to use "nice (- nice (0))" to
set the subshell's priority to normal; nice doesn't return a
defined value on all systems. Instead, since emacs_priority gives
the priority that Emacs was nastied to, we can use it to reset the
priority in a straightforward way.
[BSD4_1], [USG], [VMS] (setpriority): Remove dummy and
compatibility definitions of setpriority.
Diffstat (limited to 'src')
-rw-r--r-- | src/sysdep.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index b8f819ddba..6197eabef8 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -604,7 +604,16 @@ sys_suspend () #ifdef subprocesses close_process_descs (); /* Close Emacs's pipes/ptys */ #endif - nice (-nice (0)); /* Give the new shell the default piority */ + +#ifdef PRIO_PROCESS + { + extern int emacs_priority; + + if (emacs_priority) + nice (-emacs_priority); + } +#endif + execlp (sh, sh, 0); write (1, "Can't execute subshell", 22); _exit (1); @@ -1772,12 +1781,6 @@ read_input_waiting () #endif /* not VMS */ #ifdef BSD4_1 -/* VARARGS */ -setpriority () -{ - return 0; -} - /* * Partially emulate 4.2 open call. * open is defined as this in 4.1. @@ -2369,18 +2372,6 @@ rename (from, to) #endif -/* Set priority value to PRIO. */ - -int -setpriority (which, who, prio) - int which, who, prio; -{ - int nice (); - - nice (prio - nice (0)); - return (0); -} - #ifndef HAVE_VFORK /* @@ -3781,9 +3772,6 @@ delete_logical_name (varname) ulimit () {} -setpriority () -{} - setpgrp () {} |