Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

backend_pgf: open file handles on Windows #1324

Closed
pwuertz opened this Issue · 5 comments

3 participants

@pwuertz
Collaborator

For determining font metrics, the pgf backend is communicating with a spawned LaTeX instance. A problem on Windows is that a process spawned by subprocess automatically inherits all open file descriptors and keeps them open as long as the subprocess is running. As a result, the application will hold on to the files and moving or deleting them may fail. There is an option called close_fds that prevents this from happening, but if you enable that option there is no way of communicating with the process.

I don't see how this can be done with stdin/stdout on Windows, so the only solution appears to be the development of a own simple inter-process communication and not to inherit fds when spawning the subprocess.

@pwuertz pwuertz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@pwuertz pwuertz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@pwuertz pwuertz referenced this issue from a commit in pwuertz/matplotlib
pwuertz backend_pgf: add a remark concerning #1324 to the doc, some cleanup ff5cd1c
@pwuertz pwuertz was assigned
@pwuertz pwuertz referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@pelson
Collaborator

@pwuertz - how does this issue stand? Has this been addressed, or indeed, has anybody come across this issue?

@pwuertz
Collaborator

No, this problem is very specific and most of the time you wouldn't notice it at all. The latest fix I added back then at least reduces the problem to long running applications that won't be able to delete the temporary directories created for compiling figures.
It is a known limitation on windows (I've raged around in #1286 about that) for which you'll find a few discussions on stackoverflow - but no solution so far.

@mdboom
Owner

I was just going to ask that you add a note to the docs, but I see it's already there...

While I understand a "real" solution hasn't been found, if we feel the research has been exhausted, maybe we close this just to keep the number of open bugs down?

@pwuertz
Collaborator

Ok, closing this issue as 'wontfix'.

@pwuertz pwuertz closed this
@pwuertz
Collaborator

Good news! It seems that the inherited file descriptor bug is going to be solved in the upcoming python version 3.4.
http://www.python.org/dev/peps/pep-0446/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.