Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill dangling omc process #96

Closed
AnHeuermann opened this issue Sep 5, 2023 · 4 comments · Fixed by #97
Closed

Kill dangling omc process #96

AnHeuermann opened this issue Sep 5, 2023 · 4 comments · Fixed by #97
Assignees

Comments

@AnHeuermann
Copy link
Member

When a OMCSession isn't quit the omc process stays running forever.

Maybe finalizer is an option to kill the omc process when the memory for OMCSession is no longer accessible.

@AnHeuermann
Copy link
Member Author

We can also try something similar as in OMPython: https://github.com/OpenModelica/OMPython/blob/master/OMPython/__init__.py#L167-L193

I think we shouldn't wait for quit() in OMJulia.sendExpression. Adding a timeout or a special quit function that has some timeout and would be a good idea.

@AnHeuermann
Copy link
Member Author

Related to #32

@arun3688
Copy link
Contributor

arun3688 commented Sep 5, 2023

@AnHeuermann I guess kill(omc.omcprocess) is the better than quit as you said sometime omc process are alive even after using quit

@AnHeuermann
Copy link
Member Author

I'm working on a timeout function that first tries quit() and then checks if the process is still running and kills.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants