Hi Ralph,
Ralph Lange wrote:
http://www.aps.anl.gov/epics/wiki/index.php/How_to_Set_Up_a_Soft_IOC_Framework_on_Linux#Make_the_Soft_IOC_Create_the_PID_File
shows the code I added to my soft IOCs.
Does anyone see any possible side-effects? Would that code be
Windows-proof? Should I integrate it into the example stuff in base to
make it standard?
Good idea, but why do this in main()? The nice thing about having a
startup script is that all ioc-specific configuration can all be put
into the st.cmd file. I don't know whether windows has a getpid()
command, but this is obviously not useful on RTEMS which also uses a
main() routine.
I would just register a command that generates the PID file at a
location given in an argument; since environment variables are available
as macros you can still use $(PIDFILE) if you want. The command should
also register an epicsAtExit() routine to delete the file at shutdown.
The only disadvantage of creating the PID file from st.cmd rather than
in main() is that it won't get created quite as early in the startup
sequence, but I doubt that the difference really matters.
I don't have any major objections to something like a 'mkpid' command
going into base somewhere, but it is more of a site-specific thing; in
our case at APS I would probably include it in our asdstd support
application which all our "standard" controls IOCs must include.
- Andrew
--
The right to be heard does not automatically include
the right to be taken seriously. -- Hubert H. Humphrey
- References:
- SoftIocMain.cpp Ralph Lange
- Navigate by Date:
- Prev:
SoftIocMain.cpp Ralph Lange
- Next:
3.13. Device support report() documentation bug Ralph Lange
- Index:
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:
SoftIocMain.cpp Ralph Lange
- Next:
3.13. Device support report() documentation bug Ralph Lange
- Index:
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|