python process termination
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-18-2017 02:41 PM
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?
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-20-2017 02:36 PM
@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!
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!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-19-2017 02:04 PM
@Dave, Thanks for the explanation!
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-19-2017 01:53 PM
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.
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.
