[comp.unix.questions] vi shell escape problem

parker@mpre.UUCP (Ross Parker) (04/14/88)

Hello....

	We have been noticing a problem lately with vi running under 
Ultrix 2.0. What happens is that when shell escapes (for filtering
portions of the edit buffer) are done, they leave zombie processes
hanging around that don't die until the edit session is completed.
As you can imagine, users quickly run out of processes under these
conditions.

For example... here's the result of '!Gcat' on this file...

      F UID   PID  PPID CP PRI NI ADDR  SZ  RSS WCHAN STAT TT  TIME COMMAND
3008401 417  3358  2868  3  25  0 5ab2   0    0       Z    p0  0:00 <exiting>
3c00001 417  2824  2823  0   5  0 340a  10    7 c3fbc I    p0  0:03 -sh (sh)
3000001 417  2840  2824  0   5  0 7360  69   34 c2b34 I    p0  0:00 postnews
3008001 417  2868  2840  4   1  0 5ab2 147   53 52eb0 S    p0  0:18 vi + /tmp/post002840
2000001 417  3386  2868  1   5  0 4324   9    6 c3578 S    p0  0:00 sh -c ps xlw
3000001 417  3387  3386 51  37  0 693e 216  156       R    p0  0:00 ps xlw

The more filtering I do, the more zombies I get. Also, the tty of the zombies
doesn't always stay the same. As more filtering is done, different ttys
get picked, apparantly at random.

Has anyone seen this behaviour? The problem seems to occur under
Ultrix 1.2, 2.0, and 2.2.

BTW, Please don't just tell me to use EMACS instead! (or whatever your
favorite editor is!)

Thanks for any help anyone can give...

-- 
Ross Parker      uunet!ubc-cs!mprg!parker       |
Microtel Pacific Research Ltd.			| You can't erase the dream,
Burnaby, B.C.,					| you can only wake me up...
Canada, eh?					|

rlk@chinet.UUCP (Richard Klappal) (04/16/88)

In article <1409@mpre.UUCP> parker@mpre.UUCP (Ross Parker) writes:
>... We have been noticing a problem lately with vi running under 
>Ultrix 2.0. What happens is that when shell escapes (for filtering
>portions of the edit buffer) are done, they leave zombie processes
>hanging around that don't die until the edit session is completed.
 ...

I have noticed this problem in some vi
implementations as well.

On those implementations, doing a true shell escape,
such as
	:!sh
	^D
gets rid of the zombies.  Don't know if it will work for you,
but its simple enough to try.

No if the porters would only put the wait() statement into vi ...


-- 
---
UUCP: ..!ihnp4!chinet!uklpl!rlk || MCIMail: rklappal || Compuserve: 74106,1021
      ..!ihnp4!ihu1h!rlk
---