diff options
| author | Jim Blandy | 1992-09-23 03:51:13 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-09-23 03:51:13 +0000 |
| commit | 1593c2fe369bca32b69b979430573dbc07a27caa (patch) | |
| tree | e05880caebbd7e652fb3a0b85ab4c29d5f0398b7 /src | |
| parent | 5aa7f46a74510a4deac16c2ea5cde2f1d0fb04f6 (diff) | |
| download | emacs-1593c2fe369bca32b69b979430573dbc07a27caa.tar.gz emacs-1593c2fe369bca32b69b979430573dbc07a27caa.zip | |
* 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 b8f819ddbaa..6197eabef8d 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -604,7 +604,16 @@ sys_suspend () | |||
| 604 | #ifdef subprocesses | 604 | #ifdef subprocesses |
| 605 | close_process_descs (); /* Close Emacs's pipes/ptys */ | 605 | close_process_descs (); /* Close Emacs's pipes/ptys */ |
| 606 | #endif | 606 | #endif |
| 607 | nice (-nice (0)); /* Give the new shell the default piority */ | 607 | |
| 608 | #ifdef PRIO_PROCESS | ||
| 609 | { | ||
| 610 | extern int emacs_priority; | ||
| 611 | |||
| 612 | if (emacs_priority) | ||
| 613 | nice (-emacs_priority); | ||
| 614 | } | ||
| 615 | #endif | ||
| 616 | |||
| 608 | execlp (sh, sh, 0); | 617 | execlp (sh, sh, 0); |
| 609 | write (1, "Can't execute subshell", 22); | 618 | write (1, "Can't execute subshell", 22); |
| 610 | _exit (1); | 619 | _exit (1); |
| @@ -1772,12 +1781,6 @@ read_input_waiting () | |||
| 1772 | #endif /* not VMS */ | 1781 | #endif /* not VMS */ |
| 1773 | 1782 | ||
| 1774 | #ifdef BSD4_1 | 1783 | #ifdef BSD4_1 |
| 1775 | /* VARARGS */ | ||
| 1776 | setpriority () | ||
| 1777 | { | ||
| 1778 | return 0; | ||
| 1779 | } | ||
| 1780 | |||
| 1781 | /* | 1784 | /* |
| 1782 | * Partially emulate 4.2 open call. | 1785 | * Partially emulate 4.2 open call. |
| 1783 | * open is defined as this in 4.1. | 1786 | * open is defined as this in 4.1. |
| @@ -2369,18 +2372,6 @@ rename (from, to) | |||
| 2369 | 2372 | ||
| 2370 | #endif | 2373 | #endif |
| 2371 | 2374 | ||
| 2372 | /* Set priority value to PRIO. */ | ||
| 2373 | |||
| 2374 | int | ||
| 2375 | setpriority (which, who, prio) | ||
| 2376 | int which, who, prio; | ||
| 2377 | { | ||
| 2378 | int nice (); | ||
| 2379 | |||
| 2380 | nice (prio - nice (0)); | ||
| 2381 | return (0); | ||
| 2382 | } | ||
| 2383 | |||
| 2384 | #ifndef HAVE_VFORK | 2375 | #ifndef HAVE_VFORK |
| 2385 | 2376 | ||
| 2386 | /* | 2377 | /* |
| @@ -3781,9 +3772,6 @@ delete_logical_name (varname) | |||
| 3781 | ulimit () | 3772 | ulimit () |
| 3782 | {} | 3773 | {} |
| 3783 | 3774 | ||
| 3784 | setpriority () | ||
| 3785 | {} | ||
| 3786 | |||
| 3787 | setpgrp () | 3775 | setpgrp () |
| 3788 | {} | 3776 | {} |
| 3789 | 3777 | ||