Bug in MicroEMACS 3.7 (includes fix)

J.H.M.Aldridge jhma1 at ukc.ac.uk
Fri Oct 3 06:43:14 AEST 1986


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 at ukc.ac.uk
University of Kent at Canterbury,      ...!seismo!mcvax!ukc!jhma1
Canterbury,
Kent,
ENGLAND,
CT2 7NF



More information about the Comp.sources.bugs mailing list