[ From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 11-OCT-1990 18:27:01.28  To:	MRGATE::"ARISIA::EVERHART" CC:	 Subj:	re: Three questions...  * Received:  by crdgw1.ge.com (5.57/GE 1.73)) 	 id AA06786; Thu, 11 Oct 90 18:12:02 EDT X Received: From VENUS.YCC.YALE.EDU by CRVAX.SRI.COM with TCP; Thu, 11 OCT 90 06:36:04 PDTN Received: from BULLDOG.CS.YALE.EDU by Venus.YCC.Yale.Edu; Thu, 11 Oct 90 09:26  EDTG Received: from lrw.UUCP by BULLDOG.CS.YALE.EDU via UUCP; Thu, 11 Oct 90 
  09:20:37 EDT G Received: by lrw.UUCP (DECUS UUCP w/Smail); Thu, 11 Oct 90 09:04:34 EDT ! Date: Thu, 11 Oct 90 09:04:34 EDT ' From: Jerry Leichter <leichter@LRW.COM>  Subject: re: Three questions...  To: INFO-VAX@KL.SRI.COM 4 Message-Id: <9010111320.AA26495@BULLDOG.CS.YALE.EDU>; X-Vms-Mail-To: IN%"mdchaney@bronze.ucs.indiana.edu",INFOVAX " X-Envelope-To: info-vax@kl.sri.COM  @ 	1. In VWS, we've found that if the process attached to a windowB 	   dies or is stopped, the window is impossible to delete withoutL            rebooting the workstation.  Is that really true.  We can't figure 	   it out.   K This is a known bug in VWS V4.2.  There's another manifestation of the bug: H If you log out of a process with subprocesses, the window may also stickK around in the same way.  In this case, you can sometimes clean things up by  deleting the subprocesses.  J The best way to avoid the problem is to avoid deleting processes!  You MAYH be able to avoid it entirely in a different way:  If you look in the VWSN startup file (SYS$MANAGER:STARTVWS.COM), you'll find a section "Start emulatorH process if necessary".  In earlier versions of VWS, this was executed byN default.  Now, it is skipped by default; but there is a logical you can defineI that will cause it to be executed.  All it does is create a process named  VWS$EMULATORS.  L (For the curious:  A VWS VT terminal emulator window is managed by code thatL runs as a kernel-mode thread in some process.  Prior to V3.something of VWS,J this kernel-mode thread ran in the first process to touch the window.  ForK a login process, for example, this would normally be the top process in the L job tree.  I/O to the window in the process that was running the kernel-modeL thread simply calls into the thread.  I/O from any other process has to passI the information over to the process running the thread, then do a process K swap.  The direct calls are, for obvious reasons, faster and are preferred.   M The original approach ran into problems in clusters:  If Hold Screen was hit, K the kernel-mode thread could be blocked.  If the process running the thread L were holding some important lock - e.g., if you were logging in and you hap-L pened to hit Hold Screen while LOGINOUT had a lock on SYSUAF.DAT - it had noK way to release it, since it was blocked in kernel mode.  This could lead to J cluster crashes.  There was a short-term fix which modified Hold Screen toJ release its lock after a short time (like 30 seconds); but this was not anE acceptable solution.  It was replaced by the VWS$EMULATORS hack.  The M VWS$EMULATORS process, if it exists, becomes the owner of ALL the kernel-mode N threads.  This means that ALL processes must use the indirect, higher-overheadK method of doing I/O to terminal windows; but it also means that the process K that might get blocked in kernel mode is never the one that might hold some  important lock.   I In VWS 4.2, the mechanism was changed again (I don't know exactly how) to J allow the VWS$EMULATORS process to be "retired".  Once again, under normalL conditions the kernel-mode thread runs in the first process that touched theM window.  Unfortunately, the logic isn't quite right, and there are situations N in which the kernel-mode thread does not get called at the right time, or justK plain doesn't clean up properly.  The result is the dead windows you see on 
 your screen.)   C VWS V4.3 is out there - anyone know if this problem has been fixed.   E 	2. I have a little program that uses UIS (the VWS graphics stuff) to B 	   do some funky pictures.  However, if I try to do a big one, itF 	   get the "exceeded quota" error.  That process then locks up, whileA 	   sucking the CPU in Kernal mode, and both that window and the  G 	   graphics window that it created are in the state that I asked about G 	   in question 1. What's wrong?  Stop/ID and ForceExit have no effect.   J Some quota is too small!  VWS is very closely integrated with VMS, and hasF always had a problem recovering from various quota problems.  In earlyK versions, running out of quota tended to crash the system.  There have been H major improvements over the years; these days, you usually just lose theH process involved.  Obviously, you've found another failure mode - a more unfortunate one at that.  L Try using SHOW PROCESS/QUOTA or ANALYZE/SYSTEM to figure out which quota theK process is running out of.  (There are many possibilities; I won't even try @ to guess.)  Then increase that quota for the affected processes.  F 	3. Finally, I can create a subprocess that communicates with the mainG 	   process through a mailbox. I'd like to be able to create one, that, E 	   perhaps does DCL commands.  The problem is, although output lines C 	   are sent to the mailbox, prompts seem to be lost.  I know it is E 	   possible, because things such as "set host" work.  What do I need  	   to do to get prompts, etc?  M Prompts are written using a "read with prompt" modifier to the read operation M of the terminal driver.  The mailbox driver doesn't support this modifier, so M the prompt is ignored.  It's impossible to do what you want using the mailbox N driver.  (Even if you got around the prompting problem, there would be others.L For example, DCL ignores end-of-file from a terminal, but if it gets it from0 some other device, like a mailbox, it logs out.)  M What you need is a pseudo-terminal driver.  There has been one available from N DECUS for years; there are multiple net sources (though off-hand I can't point you to one).  L Actually - surprise - you have one on your system:  The VWS TEK4125 emulatorM uses the TJ/PZ pair of drivers, where TJ is the "terminal" side and PZ is the M "control" side.  I'm pretty sure this is the DECUS driver under another name. H (The same driver is also used for ALL terminal emulators in DECWindows.)   							-- Jerry   