In procServ, Ctrl+X is the “kill child” command by default (--killcmd, default ^X). When procServ receives it, it kills the child process using --killsig, whose default is signal 9 (SIGKILL). SIGKILL cannot be handled by the IOC, so no cleanup runs.
If you really want to use
Ctrl + X, here is ChatGPT's suggestion: one way is to modify your procServ command, passing
--killsig=2
1) Don’t use Ctrl+X for restart (quickest fix)
Use
exit in the iocsh (or whatever clean shutdown mechanism you already have). That’s why Ctrl+C /
exit works for you: it lets the IOC unwind and release the camera cleanly.
2) Reconfigure procServ so its “kill” is graceful
If you want a single-keystroke restart from procServ,
change procServ’s kill signal away from SIGKILL:
From the procServ man page:
--killsig defaults to 9 (SIGKILL), and -k/--killcmd defaults to
^X.
Example pattern (adjust to your startup scripts):
-
procServ ... --killsig=15 ...
-
or procServ ... --killsig=2 ...
-
or disable the kill keystroke entirely: --killcmd=""
Also consider increasing
--holdoff if your procServ auto-restarts very quickly; procServ already enforces a minimum restart interval (default 15 s), but some devices/driver stacks benefit from more.
Cheers,
Yong
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
Date: Thursday, March 5, 2026 at 9:12 AM
It seems like Ctrl + X kills the IOC in a way that prevents the exit handlers from running. Others may be able to provide guidance on how to trap that. But just advising users to exit the IOC with
“exit” or Ctrl C is a workaround.
Mark
Sent from my iPhone
On Mar 5, 2026, at 8:01 AM, Kim, Kuktae via Tech-talk <tech-talk at aps.anl.gov> wrote:
Hello,
I am currently developing an areaDetector IOC using the ADAndor module for the Andor iXon Ultra 888 CCD camera. We are using procServ for process management and telnet access.
When restarting the IOC, I do not encounter any issues if I type exit in the iocShell or press
Ctrl + C. However, when I press Ctrl + X, I receive the following error message upon restarting the IOC:
andorCCDConfig("CAM", "/usr/local/etc/andor/", 9059, 0, 0, 0, 0, 0)
andorCCD:AndorCCD: initializing camera with handle 100, installDir: /usr/local/etc/andor/
andorCCD:AndorCCD: camera with handle 100 not available (already claimed?)
2026/03/04 18:46:02.652 andorCCD::AndorCCD camera not detected!
We are currently using:
-
EPICS Base: R7.0.3.1
-
ADCore: R3.10
-
ADAndor: R2-8
Could you please provide any advice on what might be causing this issue? It would be greatly appreciated. Thank you.
Best regards,
Kuktae
- Replies:
- Re: ADAndor IOC Restart Issue: Camera Handle Already Claimed After Ctrl+X Termination Henrique F. Simoes via Tech-talk
- References:
- ADAndor IOC Restart Issue: Camera Handle Already Claimed After Ctrl+X Termination Kim, Kuktae via Tech-talk
- Re: ADAndor IOC Restart Issue: Camera Handle Already Claimed After Ctrl+X Termination Mark Rivers via Tech-talk
- Navigate by Date:
- Prev:
Re: ADAndor IOC Restart Issue: Camera Handle Already Claimed After Ctrl+X Termination Mark Rivers via Tech-talk
- Next:
Re: Help in debugging ACF connection issue Hu, Yong via Tech-talk
- 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
2025
<2026>
- Navigate by Thread:
- Prev:
Re: ADAndor IOC Restart Issue: Camera Handle Already Claimed After Ctrl+X Termination Mark Rivers via Tech-talk
- Next:
Re: ADAndor IOC Restart Issue: Camera Handle Already Claimed After Ctrl+X Termination Henrique F. Simoes via Tech-talk
- 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
2025
<2026>
|