First I go to the / proc directory and the problem is:
ls -al */fd |grep pipe
( "" , u .) ( ):
l-wx------ 1 root root 64 2011-05-14 23:12 17 -> pipe:[39208]
l-wx------ 1 root root 64 2011-05-14 23:12 2 -> pipe:[16245]
lr-x------ 1 root root 64 2011-05-14 23:12 4 -> pipe:[23406]
l-wx------ 1 root root 64 2011-05-14 23:12 8 -> pipe:[23406]
l-wx------ 1 root root 64 2011-05-14 23:12 17 -> pipe:[39532]
l-wx------ 1 root root 64 2011-05-14 23:12 2 -> pipe:[16245]
lr-x------ 1 root root 64 2011-05-14 23:12 4 -> pipe:[23406]
l-wx------ 1 root root 64 2011-05-14 23:12 8 -> pipe:[23406]
l-wx------ 1 root root 64 2011-05-14 23:12 1 -> pipe:[16245]
lr-x------ 1 root root 64 2011-05-14 23:12 16 -> pipe:[40032]
l-wx------ 1 root root 64 2011-05-14 23:12 17 -> pipe:[40032]
l-wx------ 1 root root 64 2011-05-14 23:12 2 -> pipe:[16245]
lr-x------ 1 root root 64 2011-05-14 23:12 4 -> pipe:[23406]
l-wx------ 1 root root 64 2011-05-14 23:12 8 -> pipe:[23406]
l-wx------ 1 tteikhua tteikhua 64 2011-05-14 23:13 1 -> pipe:[16245]
l-wx------ 1 tteikhua tteikhua 64 2011-05-14 23:13 12 -> pipe:[66674]
lr-x------ 1 tteikhua tteikhua 64 2011-05-14 23:13 13 -> pipe:[66674]
l-wx------ 1 root root 64 2011-05-14 23:30 1 -> pipe:[101794]
u , , "grep", :
, pid = 1 fd 6759:
1/fd:
total 0
dr-x------ 2 root root 0 2011-05-14 23:29 .
dr-xr-xr-x 7 root root 0 2011-05-14 22:59 ..
lrwx------ 1 root root 64 2011-05-14 23:29 0 -> /dev/console (deleted)
lrwx------ 1 root root 64 2011-05-14 23:29 1 -> /dev/console (deleted)
lrwx------ 1 root root 64 2011-05-14 23:29 2 -> /dev/console (deleted)
lr-x------ 1 root root 64 2011-05-14 23:29 3 -> pipe:[6759]
fs/pipe.c( linux, ):
static char *pipefs_dname(struct dentry *dentry, char *buffer, int buflen)
{
return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]",
dentry->d_inode->i_ino);
}
static const struct dentry_operations pipefs_dentry_operations = {
.d_dname = pipefs_dname,
};
fs/dcache.c:
char *d_path(const struct path *path, char *buf, int buflen)
{
if (path->dentry->d_op && path->dentry->d_op->d_dname)
return path->dentry->d_op->d_dname(path->dentry, buf, buflen);
and since d_path() is an exported symbol,
EXPORT_SYMBOL(d_path);
- , pipefs_dname() - :
./fs/pipe.c:
.d_dname = pipefs_dname,
inode.c: init_inode_always(), , i_pipe NULL. , inode PIPE.
, , inode i_pipe - -NULL, , inode .
, ( - ), (, "ls -al" ", ), - , , , , ..