Skip to content
New issue

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

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

Already on GitHub? # to your account

[Python bindings] Python interpreter restarts (?) after first import of python_crun #695

Closed
rijenkii opened this issue Jun 28, 2021 · 2 comments

Comments

@rijenkii
Copy link

rijenkii commented Jun 28, 2021

Checked python versions -- 3.9.5, 3.8.6, 3.6.8.
Steps to reproduce:

git clone https://github.com/containers/crun
cd crun
python3 -m venv --copies --without-pip venv
./autogen.sh
./configure --prefix=$(readlink -f venv) --enable-shared --with-python-bindings
make install

cat <<EOF > test.py
import os
print(f"First,  {os.getpid() = }")
import python_crun
print(f"Second, {os.getpid() = }")
EOF
venv/bin/python test.py

Expected output:

First,  os.getpid() = 324613
Second, os.getpid() = 324613

Actual output:

First,  os.getpid() = 324613
First,  os.getpid() = 324613
Second, os.getpid() = 324613
@giuseppe
Copy link
Member

@rijenkii
Copy link
Author

So, not a bug, understood.
If I run into problems with this I will open a new issue, thanks.

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

No branches or pull requests

2 participants