Skip to content

Instantly share code, notes, and snippets.

@yeonwooz
Created November 29, 2022 17:04
Show Gist options
  • Save yeonwooz/50074c155798a925370e62ed08306c02 to your computer and use it in GitHub Desktop.
Save yeonwooz/50074c155798a925370e62ed08306c02 to your computer and use it in GitHub Desktop.
dynamic_file_descriptor_table_
struct thread {
...
struct file **fdt;
}
t->fdt = palloc_get_page(PAL_ZERO);
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