Skip to content
Snippets Groups Projects
Commit 6843de89 authored by q3k's avatar q3k
Browse files

mpy: prevent garbage collection from closing stdin

Somwhere in Micropython there's a `<io.TextIOWrapper 0>` from
vfs_posix_file that's getting garbage collected and which in turn
triggers the object's __del__ which then in turn attempt to close FD 0.

Let's not allow that to happen by adding some ugly hardcoded deny list
for FD 0,1,2 in the close function.

Ideally, we would figure out why that object exists, why it gets garbage
collect and what really should happen here. But this is good enough.
parent cc809d99
No related branches found
No related tags found
Loading
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment