info-vax@ucbvax.ARPA (02/28/85)
From: engvax!KVC@cit-vax Does anyone out there know how to cancel a terminal IO request when the request happens to be on a channel number that you do not have? The application is this: I have written a program to perform the (undocumented so far as I know) IO$_SETMODE!IO$M_TT_DISCON function to terminals that are on the system and idle. I figure it'd be a lot nicer to disconnect the guy that forgot to log out than to simply waste-his-ass... If you aren't the type of system manager that likes to be nice to the choad that forgot to log out, then the program has it's other uses (like you logged in in the machine room to read a tape and then walked over to your office and when the tape finishes you'd like to disconnect the terminal in the machine room and reconnect to that job from your office...) In any case, the program works just fine now, thanks to the SHARE privilege, but the SETMODE QIO hangs if the other process has any sort of outstanding read (probably would with write as well) request. Now, $CANCEL won't work since the channel number you supply is not the channel number the request is on (unless $CANCEL can do something I don't know about...). So, anyone got any magic for this one? I realize that there may be cases where whatever you do to the other person's QIO may cause something odd to occur when he reconnects to his job, but even that'd be ok in the general case where the read request came from DCL and DCL will just re-issue the read. /Kevin Carosso engvax!kvc @ CIT-VAX.ARPA Hughes Aircraft Co. ps. Anyone know the difference between the IO function modifiers [IO$M_TT_DISCON, IO$M_TT_CON] and the similarly named (but different bits) [IO$M_DISCONNECT, IO$M_CONNECT]? I used the _TT_ set and it seems to work.