Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: RE: Exiting IOC
From: "Mark Rivers" <rivers@cars.uchicago.edu>
To: <kimkh@nfrc.re.kr>, <tech-talk@aps.anl.gov>
Date: Sun, 2 Apr 2006 20:46:42 -0500
Hi,
 
One way to do this, but probably not the most elegant, is to call your C cleanup function directly at the end of your main() routine for that IOC.
 
int main(int argc,char *argv[])
{
        if(argc>=2) {
        iocsh(argv[1]);
        epicsThreadSleep(.2);
    }
    iocsh(NULL);
    /* Call your cleanup function here */
    return(0);
}


________________________________

From: kimkh@nfrc.re.kr [mailto:kimkh@nfrc.re.kr]
Sent: Sun 4/2/2006 7:58 PM
To: tech-talk@aps.anl.gov
Subject: Exiting IOC



Dear ALL;

 

When I type "exit" on IOC shell, I would like to call a particular function to return system resource and then want to terminate the IOC. Is there any mechanism to register the particular function? 

Now, I register the particular function as IOC shell command and I call it on the shell before finish IOC. But, I forget it frequently, so, it is inconvenient.

 

Thank you.

Kukhee Kim

 

April 1, 2006

-----------------------------------------

Kukhee Kim

National Fusion Research Center

52 Yeoeun-dong, Yusung-gu, Daejeon 305-333

Korea

Email: kimkh@nfrc.re.kr

Tel: +82 42 870 1616     Fax: +82 42 870 1609      Cell: +82 17 513 4849

 



Navigate by Date:
Prev: Exiting IOC kimkh
Next: LabVIEW and ChannelAccess? Kay-Uwe Kasemir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: Exiting IOC Andrew Johnson
Next: LabVIEW and ChannelAccess? Kay-Uwe Kasemir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·