# HG changeset patch # User Jim Blandy # Date 717220273 0 # Node ID bc1acd76b294cbda6d8188e2ea57cc637db0a14e # Parent 3d1bf36f0896674063baaced6752fc7917b2714f * 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. diff -r 3d1bf36f0896 -r bc1acd76b294 src/sysdep.c --- a/src/sysdep.c Wed Sep 23 03:46:12 1992 +0000 +++ b/src/sysdep.c Wed Sep 23 03:51:13 1992 +0000 @@ -604,7 +604,16 @@ #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 @@ #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 @@ #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 @@ ulimit () {} -setpriority () -{} - setpgrp () {}