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: [email protected] [mailto:[email protected]]
Sent: Sun 4/2/2006 7:58 PM
To: [email protected]
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: [email protected]
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
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- 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
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|