changeset 1203:bc1acd76b294

* 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.
author Jim Blandy <jimb@redhat.com>
date Wed, 23 Sep 1992 03:51:13 +0000
parents 3d1bf36f0896
children 567860ca77e0
files src/sysdep.c
diffstat 1 files changed, 10 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- 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 ()
 {}