Xref: utzoo gnu.emacs:657 comp.emacs:5676 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: gnu.emacs,comp.emacs Subject: Re: GNU Emacs hands under BSD 4.3 (help) Summary: the well-known, easily-fixed setpgrp() bug Keywords: GNU, BSD, Emacs, Vax Message-ID: <37603@bbn.COM> Date: 22 Mar 89 18:25:15 GMT References: <10897@lanl.gov> <1324@cunixc.cc.columbia.edu> Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Followup-To: gnu.emacs Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 52 In-reply-to: sethr@cunixc.cc.columbia.edu (Seth Robertson) 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!