Skip to content

Commit b2242fa

Browse files
committed
exit with a code
1 parent 271481f commit b2242fa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

softioc/imports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def auto_decode(result, func, args):
9797
iocInit.argtypes = ()
9898

9999
epicsExit = Com.epicsExit
100-
epicsExit.argtypes = ()
100+
epicsExit.argtypes = (c_int,)
101101

102102

103103
__all__ = [

softioc/softioc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def iocInit(dispatcher=None):
3636
imports.iocInit()
3737

3838

39-
def safeEpicsExit():
39+
def safeEpicsExit(code=0):
4040
'''Calls epicsExit() after ensuring Python exit handlers called.'''
4141
if hasattr(sys, 'exitfunc'):
4242
try:
@@ -46,7 +46,7 @@ def safeEpicsExit():
4646
finally:
4747
# Make sure we don't try the exit handlers more than once!
4848
del sys.exitfunc
49-
epicsExit()
49+
epicsExit(code)
5050

5151
# The following identifiers will be exported to interactive shell.
5252
command_names = []

0 commit comments

Comments
 (0)