Writing a plain text file to disk from kernel space

Dag-Erling Smørgrav des at des.no
Mon May 21 10:58:41 UTC 2007


Lawrence Stewart <lstewart at room52.net> writes:
> I suspect that you can't use a file descriptor that was opened in one
> thread in a completely different thread, but I'm not sure if this is
> true, and if it is true, how to get around it.

A file descriptor is an index into a file table.  Different threads have
different file tables.

If you want to read from or write to files within the kernel, you need
to operate directly on vnodes, not on file descriptors.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list