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

Close the file handle used in exec_file() (for #52) #53

Open
wants to merge 1 commit into
base: develop
from

Conversation

@hotgloupi
Copy link

@hotgloupi hotgloupi commented Jan 8, 2016

For python >= 3, a plain FILE* is used, whereas for python2, an object handle takes care of the file object lifetime.
This commit manually closes the file handle after the PyRun_File() call.

For python >= 3, a plain `FILE*` is used, whereas for python2, an object handle takes care of the file object lifetime.
This commit manually closes the file handle after the `PyRun_File()` call.
@paralin
Copy link

@paralin paralin commented Feb 26, 2016

I still have this problem, can this be merged soon?

@paralin
Copy link

@paralin paralin commented Feb 26, 2016

Actually for some reason this causes an access violation:

0xC0000005: Access violation writing location 0x00000014.

So.. maybe doesn't work quite right :)

@hotgloupi
Copy link
Author

@hotgloupi hotgloupi commented Feb 26, 2016

Can you reproduce easily ? Do you have a backtrace ?

@paralin
Copy link

@paralin paralin commented Feb 26, 2016

@hotgloupi I undid the patch and don't have a backtrace. Under python 3.4 however it seems the file descriptor was cleaned up already, resulting in multiple fdclose calls on the descriptor. I didn't have too much time to look into it.

@stefanseefeld stefanseefeld force-pushed the boostorg:develop branch 2 times, most recently from 8ccdcff to 3ace4a0 Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.