From: Earl Lakia [lakia@ipact.com] Sent: Wednesday, July 05, 2000 8:15 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: Trapping a STOP/ID You can write a user written system service for executive mode. When the stop occurs, the executive system service can be called as part of the image rundown. That is how the lock manager and RMS release locks and close files. The following shows a snippet from a system service I wrote. Of course your image must be linked to the system service and the system service must be installed. extern const PLV user_services = { PLV$C_TYP_CMOD, /* type */ 0, /* version */ { {KERNEL_ROUTINE_COUNT, /* # of kernel routines */ EXEC_ROUTINE_COUNT, /* # of exec routines */ kernel_table, /* kernel routine list */ exec_table, /* exec routine list */ iqr_rundown, /* kernel rundown handler */ iqr_rundown, /* exec rundown handler */ 0, /* no RMS dispatcher */ 0, /* kernel routine flags */ 0} /* exec routine flags */ } }; #ifdef __ALPHA #pragma extern_model restore #endif /* Rundown handler */ int iqr_rundown() { /* do what ever you need */ return SS$_NORMAL; } -earl -- Earl D. Lakia Senior Staff Engineer Web: www.ipact.com Snail Mail: Email: lakia@ipact.com IPACT Inc. 260 S. Campbell St. Phone: 219-464-7212 Valparaiso, IN 46383 Adrian Birkett wrote: > All, > > I am currently writing a program that requires an event to be fired > should the program be terminated for any reason. I can trap a CTRL-Y/C > and a normal process exit using normal system services but all traps are > evaded if someone does a STOP/ID. > > Is there any way of trapping this or am I wasting my time? Any responses > welcome. > > Thanks, > > Ade > > ===== My opinion, not that of my employer =====