| The session manager Exit function has two primary tasks: 1) it
tries to force a server reset and 2) it restarts the loginout
process.
There is no easy way to force a server reset. A reset is necessary
because 1) it's the only way to guarantee that cut and paste
buffers from user #1 are cleared when user #2 logs in and 2) it causes
the server's host security list to be reset, and 3) it's an easy way
to get rid of any extraneous customization that a given user has
done. In DECwindows V1, the session manager used the XKillClient
request to shoot down every client that it could find. XKillClient
takes a resource id for input, and the session manager used
XQueryTree to find all the windows it could and issued XKillClient
requests on them. In DECwindows V2, a Digital-specific server
extension was added that allows the session manager to issue a
"please reset the server" protocol request. To make your application
emulate this, you'll probably have to do what we did in DECwindows
V1 - look at the source listings for VMS V5.2 for details.
The session manager restarts the loginout process by sending a
message to the VMS job controller saying that unsolicited input
has been received on device WSAn:. The DECW$STARTLOGIN.EXE
program does the same thing. The job controller then runs loginout
with sys$input being the WSAn device. To make your application
emulate this, you could try a lib$do_command to run decw$startlogin.
If your application is running with normal privs (i.e. only TMPMBX
and NETBMX), you'll have to install the decw$startlogin image with
the install utility and give it CMKRNL.
|