Mark (London?) writes: > >I have a program which is run in SYLOGIN.COM and prompts a user for input. >However, under DECWINDOWs, if I install this program, a window doesn't get >created. The attempt to input from the terminal causes the window creation >to fail. I'm guessing that somehow it is reading from the session manager >window or some other weirdness. Even putting a simple INQUIRE doesn't work. >I did try a READ from TT:, and that simply caused the session manager to >hang, requiring a reboot. Is there any way which I can test to see if the >terminal is available to be read from? Thanks. > Mark > > I tripped over this one about two weeks ago. The problem is that DECWindows applications, including DECTerm, are created as detached processes with SYS$INPUT and SYS$OUTPUT defined as mailboxes. When they are created, they read and execute SYSLOGIN.COM and LOGIN.COM. After they get started, they redefine SYS$INPUT and SYS$OUTPUT to be terminal devices and read and execute SYLOGIN.COM and LOGIN.COM _again_! The fix is $ IF F$GETDVI("SYS$OUTPUT", "TRM") THEN run program. Alternatively, $ IF .NOT. F$GETDVI("SYS$OUTPUT", "TRM") THEN GOTO 10$ $ READ things $ WRITE things $ 10$ This ensures that you don't read/write the mailboxes. ************************************************************************* * * * Here, there be dragons! * * dragon@nscvax.princeton.edu * * * * Richard B. Gilbert * *************************************************************************