Subject: Emacs 19.22 patches (fwd)
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Henry Hwong <henryh@well.sf.ca.us>
List: current-users
Date: 02/15/1994 21:31:27
At John Brezak's <brezak@ch.hp.com> request, I'm forwarding the patch posted
by Andrew Herbert <andrew@werple.apana.org.au> in the gnu.emacs.bug news-
group that fixes the annoying "sh -c emacs" with NetBSD problem.

-Henry (henryh@well.sf.ca.us)

From: andrew@werple.apana.ORG.AU (Andrew Herbert)
Newsgroups: gnu.emacs.bug
Subject: emacs 19.22 & netbsd-current - process group fixes
Date: 14 Feb 1994 01:20:27 -0500
Organization: GNUs Not Usenet
Lines: 37
Approved: bug-gnu-emacs@prep.ai.mit.edu
Distribution: gnu
Message-ID: <199402140138.MAA09668@werple.apana.org.au>

These patches fix the bug whereby emacs processes execed from processes
other than the session leader fail to startup successfully.

Andrew
--
--- emacs-19.22/src/emacs.c.unhacked	Mon Feb 14 11:56:21 1994
+++ emacs-19.22/src/emacs.c	Fri Dec 10 13:52:05 1993
@@ -322,7 +322,7 @@
 
   clearerr (stdin);
 
-#ifdef BSD
+#if defined(BSD) && !defined(__NetBSD__)
   {
     inherited_pgroup = EMACS_GETPGRP (0);
     setpgrp (0, getpid ());
--- emacs-19.22/src/sysdep.c.unhacked	Mon Feb 14 11:57:07 1994
+++ emacs-19.22/src/sysdep.c	Fri Dec 10 15:02:44 1993
@@ -775,7 +779,7 @@
 
 /* Saving and restoring the process group of Emacs's terminal.  */
 
-#ifdef BSD
+#if defined(BSD) && !defined(__NetBSD__)
 
 /* The process group of which Emacs was a member when it initially
    started.
@@ -1407,7 +1415,7 @@
   hft_reset ();
 #endif
 
-#ifdef BSD
+#if defined(BSD) && !defined(__NetBSD__)
   widen_foreground_group ();
 #endif
 }



------------------------------------------------------------------------------