Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!ukc!jhma1 From: jhma1@ukc.ac.uk (J.H.M.Aldridge) Newsgroups: net.sources.bugs Subject: Bug in MicroEMACS 3.7 (includes fix) Message-ID: <1923@eagle.ukc.ac.uk> Date: Thu, 2-Oct-86 16:43:14 EDT Article-I.D.: eagle.1923 Posted: Thu Oct 2 16:43:14 1986 Date-Received: Tue, 7-Oct-86 23:15:30 EDT Reply-To: jhma1@ukc.ac.uk (J.H.M.Aldridge) Distribution: net Organization: U of Kent at Canterbury, Canterbury, UK Lines: 64 Keywords: Sending SIGTSTP to MicroEMACS There is a fproblem with MicroEMACS 3.7 (when run under 4.1 and 4.2 BSD UNIX) which occurs if the editor is called by another program (e.g. mail) and you then want to suspend the job. Currently, if you type ESC-S (suspend-emacs) the editor will stop but a further ^Z will be needed to suspend the calling process. The fix for this is to modify the bktoshell routine in the spawn.c file so that instead of sending the SIGTSTP signal just to the current process, the signal gets sent to all processes in the current process group. The context diff between the two versions of spawn.c follow: ------------CUT---ALONG---DOTTED---LINE----------- *** spawn.c.old Thu Oct 2 21:16:44 1986 --- spawn.c Thu Oct 2 21:19:06 1986 *************** *** 104,111 bktoshell() /* suspend MicroEMACS and wait to wake up */ { - int pid; - vttidy(); pid = getpid(); kill(pid,SIGTSTP); --- 104,109 ----- bktoshell() /* suspend MicroEMACS and wait to wake up */ { vttidy(); kill(0,SIGTSTP); /* Suspend all processes in process group */ } *************** *** 107,114 int pid; vttidy(); ! pid = getpid(); ! kill(pid,SIGTSTP); } rtfrmshell() --- 105,111 ----- bktoshell() /* suspend MicroEMACS and wait to wake up */ { vttidy(); ! kill(0,SIGTSTP); /* Suspend all processes in process group */ } rtfrmshell() --- James Aldridge, jhma1@ukc.ac.uk University of Kent at Canterbury, ...!seismo!mcvax!ukc!jhma1 Canterbury, Kent, ENGLAND, CT2 7NF