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

Python: segfault when using sys.exit #27

Closed
hsorby opened this issue Jun 10, 2019 · 2 comments
Closed

Python: segfault when using sys.exit #27

hsorby opened this issue Jun 10, 2019 · 2 comments

Comments

@hsorby
Copy link

hsorby commented Jun 10, 2019

When I try and use sys.exit I get a segmentation fault. This script illustrates the issue

import sys
import OpenCOR


if __name__ == "__main__":
    sys.exit(3)

When I run on Ubuntu with the following command:

./OpenCOR-2019-05-23-Linux/bin/OpenCOR -c PythonRunScript::script test.py

The resulting output is

Segmentation fault

with a return code of 139.

@dbrnz
Copy link
Owner

dbrnz commented Jun 11, 2019

@hsorby, this is now awaiting opencor/opencor#2107.

@dbrnz
Copy link
Owner

dbrnz commented Jun 11, 2019

Fixed in the new release here. OpenCOR now returns the exit code (set by sys.exit()) to the invoking shell.

@dbrnz dbrnz closed this as completed Jun 11, 2019
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

No branches or pull requests

2 participants