[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1801.0. "Chacth the quit event from session manager" by TOSSUC::CREMASCO () Tue Nov 28 1989 09:34

    
    I need to known if is possible to decwindows application to be
    notified when the session manager is quiting.
    I mean, there is an graphics interface that comunicate with other
    process, and i need to close correctly this comunication when
    the application exit. If i quit the session with the session manager
    my application is stopped and the comunication is broken abnormaly.
    I need to chatch this event to close correctly my program.
    Samebody have any ideas ????
    
    						Roberto Cremasco.
    
T.RTitleUserPersonal
Name
DateLines
1801.1try using xsetioerrorhandlerSTAR::BROUILLETTETue Nov 28 1989 17:086
    
    When the session manager resets the server, your connection is broken. 
    You could set up an XIO error event handler.  Use XSetIOErrorHandler. 
    The routine you specify will be called when the connection is broken
    and you can do your clean up work there.
    
1801.2PSW::WINALSKICareful with that VAX, EugeneTue Nov 28 1989 21:576
Under VMS, you can declare an exit handler for your program so that if it is
terminated, the exit handler gets control.  See the $DCLEXH system service
description in the doc set.  Of course, that won't work if the Session Manager
terminates applications using $DELPRC.

--PSW
1801.3TOSSU3::CREMASCOWed Nov 29 1989 08:487
    Many thanks for your answers. I try now.
    
    Do you know if the session manager use realy the $DELPRC?
    
    
    RoC.
    
1801.4Session Manager does not use $DELPRCSTAR::VATNEPeter Vatne, VMS DevelopmentWed Nov 29 1989 12:028
The session manager does not use $DELPRC to terminate applications.  The
applications can be running anywhere on the network.  The session manager
sends a message to the server to disconnect all clients.  When the server
closes the connection, the client on the other end of the connection will
receive an error inside Xlib.

Either Karen's or Paul's suggestions will work, but I would go with Karen's
suggestion, as I believe XSetIOErrorHandler is transportable.