2 ms·
I think of file descriptors as a void* across address spaces In C you often use void* for opaque handles. But you can't have a user space pointer into the ker
by chubot 3y ago
I think of file descriptors as a void* across address spaces
In C you often use void* for opaque handles.
But you can't have a user space pointer into the kernel, since it's in a different address space. So you instead have an integer that's unique within a particular process, and then a per-process table in the kernel that points to the real data structures.