Experimental Physics and
| |||||||||||||||||
|
Michael Abbott wrote: Is there any way to request the orderly shutdown of an IOC, waiting for all IOC threads to terminate (I'm guessing not). Probably not in the way you're looking for. You can type 'exit' into the ioc shell which will stop the IOC, but you may not regard the resulting shutdown as 'orderly'. I have a lot of resources open which I would like to close cleanly: but if IOC threads are still running then I have to synchronise with them to ensure closed resources aren't used by calls from IOC threads. The problem is that the IOC extensibility mechanisms (record, device and driver support etc.) were designed before the idea of porting to non-vxWorks systems came up, and the original concept for the vxWorks systems was that they boot up on power up, and then they run until they get turned off. As a result there's nothing in the record support or device support interfaces to ask them to shut down nicely, and retro-fitting such an interface would be a major re-engineering effort (which we want to do anyway for other reasons too, but the results cannot be backwards-compatible and it's hard for APS to justify spending effort on such work). We already know that the internal CA client that handles links has issues with IOC shutdown; I think there's 'string and sealing wax' in that code to try and be as tidy as possible, but it's not great. You can use the epicsAtExit() facility to get callbacks when shutdown is occurring, but the current state of the other threads when this happens is not well-defined, meaning your I/O thread may be active at the time and there's nothing we can do about that. I'm running an EPICS 3.14 IOC as a Linux process, using iocsh(filename) to load databases and get things rolling, and then running as a daemon the rest of the time. I hope you've heard of the GNU Screens program, which is a wonderful way of attaching to IOC consoles to provide simultaneous access to the console session, a history buffer and the ability to disconnect and reconnect at will. We use this for both soft and hard IOCs here. - Andrew -- The right to be heard does not automatically include the right to be taken seriously. -- Hubert H. Humphrey
| ||||||||||||||||
ANJ, 10 Nov 2011 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |