Created
November 29, 2022 16:58
-
-
Save yeonwooz/d74149c24e59bf543416175becdf8efe to your computer and use it in GitHub Desktop.
file descriptor table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct thread { | |
... | |
struct file *fdt[128]; | |
} | |
for (int i = 2; i < 128; ++i ){ | |
t->fdt[i] = NULL; | |
} | |
t->fdt[0] = 0; // stdin | |
t->fdt[1] = 1; // stdout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment