Commit 856a73b3 authored by Jim Blandy's avatar Jim Blandy
Browse files

Changes for correct pgrp behavior; approach suggested by Bob

	Glickstein <bobg@zindigo.z-code.com>:
	* m/iris4d.h (LIB_STANDARD): Do list -lbsd here.
	* s/irix4-0.h (getpgrp, setpgrp): #define these to call BSDgetpgrp
	and BSDsetpgrp.
	(GETPGRP_NO_ARG): Don't #define this.
	* emacs.c (main): Don't test GETPGRP_NO_ARG.
	* sysdep.c (sys_suspend): Don't test GETPGRP_NO_ARG.
parent afd0d237
...@@ -300,11 +300,7 @@ main (argc, argv, envp) ...@@ -300,11 +300,7 @@ main (argc, argv, envp)
#ifdef BSD #ifdef BSD
{ {
#ifdef GETPGRP_NO_ARG
inherited_pgroup = getpgrp ();
#else /* THISSENTENCE_NO_VERB */
inherited_pgroup = getpgrp (0); inherited_pgroup = getpgrp (0);
#endif
setpgrp (0, getpid ()); setpgrp (0, getpid ());
} }
#endif #endif
...@@ -687,11 +683,7 @@ shut_down_emacs (sig, no_x, stuff) ...@@ -687,11 +683,7 @@ shut_down_emacs (sig, no_x, stuff)
{ {
int tpgrp; int tpgrp;
if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1 if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1
#ifdef GETPGRP_NO_ARG
&& tpgrp == getpgrp ())
#else
&& tpgrp == getpgrp (0)) && tpgrp == getpgrp (0))
#endif
{ {
fflush (stdout); fflush (stdout);
reset_sys_modes (); reset_sys_modes ();
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
#define USG5_3 #define USG5_3
#define IRIX4 #define IRIX4
#define USE_IRIX_BSDPGRP
#define HAVE_ALLOCA #define HAVE_ALLOCA
#ifndef NOT_C_CODE #ifndef NOT_C_CODE
#include <alloca.h> #include <alloca.h>
...@@ -52,6 +50,10 @@ ...@@ -52,6 +50,10 @@
strcpy (pty_name, name); \ strcpy (pty_name, name); \
} }
/* Use the BSD versions of the getpgrp and setpgrp functions. */
#define setpgrp(pid, pgrp) BSDsetpgrp((pid), (pgrp))
#define getpgrp(pid) BSDgetpgrp(pid)
/* jpff@maths.bath.ac.uk reports `struct exception' is not defined /* jpff@maths.bath.ac.uk reports `struct exception' is not defined
on this system, so inhibit use of matherr. */ on this system, so inhibit use of matherr. */
#define NO_MATHERR #define NO_MATHERR
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