TWADE@CSVAX.UCD.HEA.IRL (06/26/87)
1. Somebody wanted a program to drop DTR line on a terminal. The following program may be of use. It is part of an automatic logout feature which ensures the user is also disconnected from our Gandalf switch. The program is called as a foreign command with the terminal name as the argument. File HANGUP.MAR --------X Cut Here X---------------------------------------------------------- ; Hang up a modem line. Normally done after ; bouncing a user if the terminal mode is set ; to /NOHANGUP .Title HANGUP Device: .Long 20 ; string descriptor .Address dev_text ; for device to be Dev_text: .Blkb 20 ; hung up. Ttchan: .Word 0 ; channel to terminal Iosb: .Quad 0 ; status block .Entry Start M <R6> Pushaq device ; get device name from Calls #1, GLIB$GET_FOREIGN ; foreign comand utility Blbc R0, error ; check for no command $ASSIGN_S - ; open terminal chan = ttchan, - devnam = device Blbc R0, error $QIOW_S - ; drop the DTR signal chan = ttchan, - func = #<IO$_SETMODE!IO$M_HANGUP>, - iosb = iosb Blbc R0, error Movzwl iosb, R0 ; now test the status Blbc R0, error ; return value. $DASSGN_S - ; close the channel chan = ttchan Ret ; won't fail Error: Movl R0, R6 ; save failure code $DASSGN_S - ; first close the channel chan = ttchan ; (ignore error if already ; closed). Movl R6, R0 ; restore failure code Ret ; and hand it to DCL .End Start ---------X Cut Here X----------------------------------------------------------- 2. Many thanks to those who responded to my query on Gmail, it sounds a useful tool, and I will probably implement it here. 3. Apologies to anyone I may have misled concerning my suggestion about raising priorities. In a previous message, I suggested using the $SETUAI service in a privileged program to change the max priority for a user. This, of course, will not work, as the SYSUAF is only consulted by LOGINOUT when the process is started. I can only offer the excuse that this was caused by datacheck errors in the brain after a long night's slaving over a hot terminal. ------------------------------------------------------------------------- Tom Wade Bitnet: twade@csvax.ucd.hea.irl Systems Programmer Ean: twade@csvax.ucd.irl Dept Computer Science PSI: PSI%+27243154000721::TWADE University College Dublin Telex: (0500) 91196 UCD EI Ireland. Uucp: !mcvax!euroies!twade%csvax.ucd.hea.irl Voice: +353-1-693244 Ext 2472 -------------------------------------------------------------------------