[comp.emacs] GNU Emacs hands under BSD 4.3

sethr@cunixc.cc.columbia.edu (Seth Robertson) (03/22/89)

In article <10897@lanl.gov> dph@lanl.gov (David Huelsbeck) writes:
>I just installed GNU Emacs 18.53 on a VAX 11/785 running BSD 4.3,


The problem is due to a *bug*.  The best thing to do is to grab a can
of raid.  Spray into emacs.c, and remove all (2) lines that say:
"setpgrp".

In addition, it might well be a good idea if Richard Stallman
or some Important Person at MIT/UUNET/etc could modify the code
and redistribute the bug-free code to all points of interest.
(18.53 1/2)

					-Seth
					 seth@ctr.columbia.edu

pae@cos.com (Paul A. Ebersman) (03/22/89)

From article <10897@lanl.gov>, by dph@lanl.gov (David Huelsbeck):
> I just installed GNU Emacs 18.53 on a VAX 11/785 running BSD 4.3,
> and I'm seeing a problem that I have no idea how to track down.
> Emacs comes up just fine when it's called from the command line
> but it hangs when invoked from another program.  As an example using
> the ~e command within mail will cause emacs to stop. (STAT is T when
> a ps is done.)  
> 

I got the same thing installing 18.53 on a Sun running OS3.5 and one
running 3.4. (Though I got status P when I did a ps).

I tried exec within a shell script, and that worked, but scips the
rest of the shell script. And, as expected, if I call the first
shell script from another shell script, it also hung.

-- 
               Paul A. Ebersman @ Corporation for Open Systems
  pae@cos.COM or pae%cos.com@uunet.uu.net or {uunet, sundc, hadron}!cos!pae
     ( The difference between practice and theory in practice is always
      greater than the difference between practice and theory in theory. )

jr@bbn.com (John Robinson) (03/23/89)

In article <1324@cunixc.cc.columbia.edu>, sethr@cunixc (Seth Robertson) writes:
>In addition, it might well be a good idea if Richard Stallman
>or some Important Person at MIT/UUNET/etc could modify the code
>and redistribute the bug-free code to all points of interest.
>(18.53 1/2)

Well, gee, I'm not very important or anything, but do you think anyone
would mind if I distributed the patch?  It's purty small, so I reckon
there's no good to sending a new copy of the whole file nowhere.

While I'm here, let me add the ChangLog entry that goes with this
change.  It looks like it was put in with good intentions, but without
knowledge of the grim side-effects it would have on shell scripts or
other programs that run emacs in inferior forks.  I would never do
such a thing - rather sit in emacs all day long...

 Sat Feb 18 09:03:52 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	 * emacs.c (main) [BSD]: Do setpgrp.  May avoid some Unix signal bugs.

Here's the change (only one made in emacs.c, so you can undo this by
putting your release 18.52 copy of emacs.c into your 18.53
distribution area):

diff -rc2N dist-18.52/src/emacs.c dist-18.53/src/emacs.c
*** dist-18.52/src/emacs.c	Fri Aug 26 18:31:50 1988
--- dist-18.53/src/emacs.c	Sat Feb 18 09:03:50 1989
***************
*** 225,228 ****
--- 225,233 ----
  #endif HIGHPRI
  
+ #ifdef BSD
+   /* interrupt_input has trouble if we aren't in a separate process group.  */
+   setpgrp (getpid (), getpid ());
+ #endif
+ 
    inhibit_window_system = 0;
  
So it seems that some systems that use interrupt_input will behave
worse without this setpgrp() call, so there should be some folks out
there would prefer to leave this code in.  None as much as owned up
yet, though.

Just run that feller through patch and remake yer emacs, and this
shellscript problem'll be fixed.

Shucks.
--
/jr
jr@bbn.com or bbn!jr
C'mon big money!

gnulists@WHEATIES.AI.MIT.EDU (03/26/89)

Return-Path: <MAILER-DAEMON@eddie.mit.edu>
Date: Thu, 22 Mar 84 08:42:40 EST
From: MAILER-DAEMON@eddie.mit.edu (Mail Delivery Subsystem)
Subject: Returned mail: unknown mailer error 1
To: <info-gnu-emacs-request@prep.ai.mit.edu>

   ----- Transcript of session follows -----
resolve 'eeg!doug' = 'ames!lll-winken!eeg!doug' @ 'll-xn' (UUCP)
resolve 'noao!asuvax!nud!rcb' = 'ncar!noao!asuvax!nud!rcb' @ 'gatech' (UUCP)
inews: Cannot get user's name
554 "|/usr/local/lib/news/nrecnews -n comp.emacs -x mirror"... unknown mailer error 1

   ----- Unsent message follows -----
Received: by EDDIE.MIT.EDU with sendmail-5.45/4.7 id <AA08607@EDDIE.MIT.EDU>; Thu, 22 Mar 84 05:52:39 EST
Received: from prep.ai.mit.edu by life.ai.mit.edu; Wed, 22 Mar 89 17:03:41 EST
Received: from TUT.CIS.OHIO-STATE.EDU by prep.ai.mit.edu; Wed, 22 Mar 89 16:36:25 EST
Received: by tut.cis.ohio-state.edu (5.59/3.890314)
	id AA06502; Wed, 22 Mar 89 13:34:39 EST
Received: from USENET by tut.cis.ohio-state.edu with netnews
	for info-gnu-emacs@prep.ai.mit.edu (info-gnu-emacs@prep.ai.mit.edu)
	(contact usenet@tut.cis.ohio-state.edu if you have questions)
Date: 22 Mar 89 18:25:15 GMT
From: jr%bbn.com@bbn.com  (John Robinson)
Organization: BBN Systems and Technologies Corporation, Cambridge MA
Subject: Re: GNU Emacs hands under BSD 4.3 (help)
Message-Id: <37603@bbn.COM>
References: <10897@lanl.gov>, <1324@cunixc.cc.columbia.edu>
Sender: info-gnu-emacs-request@prep.ai.mit.edu
To: info-gnu-emacs@prep.ai.mit.edu

In article <1324@cunixc.cc.columbia.edu>, sethr@cunixc (Seth Robertson) writes:
>In addition, it might well be a good idea if Richard Stallman
>or some Important Person at MIT/UUNET/etc could modify the code
>and redistribute the bug-free code to all points of interest.
>(18.53 1/2)

Well, gee, I'm not very important or anything, but do you think anyone
would mind if I distributed the patch?  It's purty small, so I reckon
there's no good to sending a new copy of the whole file nowhere.

While I'm here, let me add the ChangLog entry that goes with this
change.  It looks like it was put in with good intentions, but without
knowledge of the grim side-effects it would have on shell scripts or
other programs that run emacs in inferior forks.  I would never do
such a thing - rather sit in emacs all day long...

 Sat Feb 18 09:03:52 1989  Richard Stallman  (rms at sugar-bombs.ai.mit.edu)

	 * emacs.c (main) [BSD]: Do setpgrp.  May avoid some Unix signal bugs.

Here's the change (only one made in emacs.c, so you can undo this by
putting your release 18.52 copy of emacs.c into your 18.53
distribution area):

diff -rc2N dist-18.52/src/emacs.c dist-18.53/src/emacs.c
*** dist-18.52/src/emacs.c	Fri Aug 26 18:31:50 1988
--- dist-18.53/src/emacs.c	Sat Feb 18 09:03:50 1989
***************
*** 225,228 ****
--- 225,233 ----
  #endif HIGHPRI
  
+ #ifdef BSD
+   /* interrupt_input has trouble if we aren't in a separate process group.  */
+   setpgrp (getpid (), getpid ());
+ #endif
+ 
    inhibit_window_system = 0;
  
So it seems that some systems that use interrupt_input will behave
worse without this setpgrp() call, so there should be some folks out
there would prefer to leave this code in.  None as much as owned up
yet, though.

Just run that feller through patch and remake yer emacs, and this
shellscript problem'll be fixed.

Shucks.
--
/jr
jr@bbn.com or bbn!jr
C'mon big money!

gnulists@WHEATIES.AI.MIT.EDU (03/28/89)

In article <10897@lanl.gov> dph@lanl.gov (David Huelsbeck) writes:
>I just installed GNU Emacs 18.53 on a VAX 11/785 running BSD 4.3,

The problem is due to a *bug*.  The best thing to do is to grab a can
of raid.  Spray into emacs.c, and remove all (2) lines that say:
"setpgrp".

In addition, it might well be a good idea if Richard Stallman
or some Important Person at MIT/UUNET/etc could modify the code
and redistribute the bug-free code to all points of interest.
(18.53 1/2)

					-Seth
					 seth@ctr.columbia.edu

gnulists@WHEATIES.AI.MIT.EDU (03/28/89)

Howdy GNUrus,

I just installed GNU Emacs 18.53 on a VAX 11/785 running BSD 4.3,
and I'm seeing a problem that I have no idea how to track down.
Emacs comes up just fine when it's called from the command line
but it hangs when invoked from another program.  As an example using
the ~e command within mail will cause emacs to stop. (STAT is T when
a ps is done.)  

Any ideas?

	David Huelsbeck
	dph@lanl.gov

gnulists@WHEATIES.AI.MIT.EDU (03/28/89)

>From article <10897@lanl.gov>, by dph@lanl.gov (David Huelsbeck):
> I just installed GNU Emacs 18.53 on a VAX 11/785 running BSD 4.3,
> and I'm seeing a problem that I have no idea how to track down.
> Emacs comes up just fine when it's called from the command line
> but it hangs when invoked from another program.  As an example using
> the ~e command within mail will cause emacs to stop. (STAT is T when
> a ps is done.)  
> 

I got the same thing installing 18.53 on a Sun running OS3.5 and one
running 3.4. (Though I got status P when I did a ps).

I tried exec within a shell script, and that worked, but scips the
rest of the shell script. And, as expected, if I call the first
shell script from another shell script, it also hung.

-- 
               Paul A. Ebersman @ Corporation for Open Systems
  pae@cos.COM or pae%cos.com@uunet.uu.net or {uunet, sundc, hadron}!cos!pae
     ( The difference between practice and theory in practice is always
      greater than the difference between practice and theory in theory. )