procfs in FreeBSD

Robert Watson rwatson at freebsd.org
Tue Jul 20 19:38:47 PDT 2004


On Mon, 19 Jul 2004, ravi wrote:

> what is the use of PFS_PROCDEP in the following statement ?
> 
>  dir = pfs_create_dir(root, "pid",
>             procfs_attr, NULL, PFS_PROCDEP);
> 
> And there is no entry under /proc with the name "pid" . 
> 
> Why is it so ? 

I'm not all that familiar with pseudofs, but I believe that the
PFS_PROCDEP flag is a "magic" flag that tells procfs to create
process-specific directories under the directory in question, and the
"pid" is basically place-holder text.  I.e., the presence of the directory
node created above tells procfs to spit out lots of per-process
subdirectories instead.  The details here are a bit hazy to me, but
perhaps this is enough to point you in the right direction?

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org      Principal Research Scientist, McAfee Research





More information about the freebsd-fs mailing list