cancel
Showing results for 
Search instead for 
Did you mean: 

python process termination

python process termination

bw447
New Contributor III
I have a question on what happens when a process is terminated.

I create a process: create process Proc python-module [python file] start on-demand

I then start it: start process Proc slot 1

When I terminate it: terminate process Proc gracefully slot 1

Is there an exception that I can catch in my python script so I can do some kind of cleanup or extra logging before the process completely dies?

7 REPLIES 7

bw447
New Contributor III
@Dave, Currently we are running 16.1.3.6

I prefer to get the output from a command as xml when running a script:

exsh.clicmd(cmd, xml=True)

Are there plans to be able to get xml output from a process? From what I see in the Python doc it's only possible to receive output as regular text.

Thanks!

bw447
New Contributor III
@Dave, Thanks for the explanation!

Dave_Hammers
Extreme Employee
Unfortunately, no.
The 'create process' in EXOS runs the python code in its own thread which means python threading rules apply.

A possible future enhancement would be to signal the thread in some fashion that a SystemExit exception occurred, but that doesn't help you in currently shipping EXOS.
GTM-P2G8KFN