[alt.sources.d] Suspend problem with vile.

jharper@triton.unm.edu (TL) (06/25/91)

Now, for my question. It appears, that the vile editor (unless I compiled
the wrong settings) has a problem with suspend. Whenever I leave the 
editor typing ctrl-Z, my terminal locks up. Anyone encounter this problem?

 Email: jharper@triton.unm.edu             ____-------^^^^^---________
  UUCP: ...!ariel!jharper         _-==~~~~~                           ~~~~~==== 
  ________________________________'   """""--------___________--------"""""
 (========================(  ||   )         / 
  """/"""""""/""""""""""""""""/"""         = 
    /       /____----======~~~            =' 
   (__                                   ='   
      """""""""\______________________ -'       "Space. A final fronteer..."   

jaap@sequent.com (Jaap Vermeulen) (06/26/91)

In <1991Jun25.001812.12575@ariel.unm.edu> jharper@triton.unm.edu (TL) writes:

>Now, for my question. It appears, that the vile editor (unless I compiled
>the wrong settings) has a problem with suspend. Whenever I leave the 
>editor typing ctrl-Z, my terminal locks up. Anyone encounter this problem?

vile does not reset it's terminal settings when suspended.
Annoying (although with tcsh not a real problem since it sets the
terminal to a sane state) and I'm sure it can be fixed easily (I
added a NON_OFFICIAL patch).

I like this editor overall pretty well (die hard vi users will
never use emacs :-), although I miss the powerful regular
expression vi offered (including capturing part of the search
pattern in the replacement pattern) and the inability to define
powerful macros (yet). Another small nuisance is that the return
key does not always work the way it used to in vi; you need to
hit the spacebar first and then the return key.

Overall a thumbs up!

Here is the diff for the suspend problem:

*** spawn.c	Tue Jun 18 16:52:02 1991
--- next/spawn.c	Tue Jun 25 10:59:48 1991
***************
*** 145,151
  	curwp->w_flag = WFHARD;  /* is this needed, with sgarbf == TRUE? */
  	sgarbf = TRUE;
  #if USG
! 	signal(SIGCONT,rtfrmshell);	/* suspend & restart */
  	update(TRUE);
  #endif
  #endif

--- 145,152 -----
  	curwp->w_flag = WFHARD;  /* is this needed, with sgarbf == TRUE? */
  	sgarbf = TRUE;
  #if USG
! 	signal(SIGTSTP,bktoshell);	/* suspend */
! 	signal(SIGCONT,rtfrmshell);	/* restart */
  	update(TRUE);
  #endif
  #endif
*** termio.c	Tue Jun 18 16:52:22 1991
--- next/termio.c	Tue Jun 25 10:51:03 1991
***************
*** 241,246
  
  #if UNIX && defined(SIGTSTP)
  	{
  	extern	int rtfrmshell();	/* return from suspended shell */
  	signal(SIGTSTP,SIG_DFL);	/* set signals so that we can */
  	signal(SIGCONT,rtfrmshell);	/* suspend & restart */

--- 241,247 -----
  
  #if UNIX && defined(SIGTSTP)
  	{
+ 	extern	int bktoshell();	/* return back to shell */
  	extern	int rtfrmshell();	/* return from suspended shell */
  	signal(SIGTSTP,bktoshell);	/* suspend */
  	signal(SIGCONT,rtfrmshell);	/* restart */
***************
*** 242,249
  #if UNIX && defined(SIGTSTP)
  	{
  	extern	int rtfrmshell();	/* return from suspended shell */
! 	signal(SIGTSTP,SIG_DFL);	/* set signals so that we can */
! 	signal(SIGCONT,rtfrmshell);	/* suspend & restart */
  	signal(SIGTTOU,SIG_IGN);	/* ignore output prevention */
  	}
  #endif

--- 243,250 -----
  	{
  	extern	int bktoshell();	/* return back to shell */
  	extern	int rtfrmshell();	/* return from suspended shell */
! 	signal(SIGTSTP,bktoshell);	/* suspend */
! 	signal(SIGCONT,rtfrmshell);	/* restart */
  	signal(SIGTTOU,SIG_IGN);	/* ignore output prevention */
  	}
  #endif

	-Jaap-