Re: fdescfs functional in 6.1?

2006-07-29 Thread Jaye Mathisen
I guess I just expected it to print all character device entries for the
file descriptors open by my process.

Kind of like the old /dev/fd/1 /dev/fd/2 directories used to be under MAKEDEV...

On Fri, Jul 28, 2006 at 11:18:48PM -0500, Dan Nelson wrote:
 In the last episode (Jul 28), Jaye Mathisen said:
  devfs is mounted, fdesc is unmounted:
  
  s2# ls -l /dev/fd
  total 0
  crw-rw-rw-  1 root  wheel  250,   0 Jul 25 03:25 0
  crw-rw-rw-  1 root  wheel  250,   1 Jul 25 03:28 1
  crw-rw-rw-  1 root  wheel  250,   2 Jul 25 03:27 2
  
  Looks just like I think it should.
  
  Then:
  s2# mount -t fdescfs fdescfs /dev/fd
  s2# ls -l /dev/fd
  total 16
  crw--w  1 root  tty 5,   1 Jul 28 18:01 0
  crw--w  1 root  tty 5,   1 Jul 28 18:01 1
  crw--w  1 root  tty 5,   1 Jul 28 18:01 2
  d-w---  1 mailnull  mailnull   512 Jul 23 00:01 3
  d-  1 root  wheel  512 Jul 25 03:25 4
  s2# umount /dev/fd
  
  This thing is all over the map.. permissions changed, a *directory*
  for fd's 3 and 4?  
 
 What do you expect ls to open to print a *directory* listing? :)
 
 fd's 0, 1, and 2 are /dev/tty, and the permissions look fine.
 
 fd 3 is your current directory (so I guess you're in some smtp-related
 directory?), and fd 4 is the directory on the commandline (/dev/fd).
 
 -- 
   Dan Nelson
   [EMAIL PROTECTED]
 
 
 !DSPAM:44caf09f196113296012617!
 
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: fdescfs functional in 6.1?

2006-07-29 Thread Dan Nelson
In the last episode (Jul 28), Jaye Mathisen said:
 On Fri, Jul 28, 2006 at 11:18:48PM -0500, Dan Nelson wrote:
  In the last episode (Jul 28), Jaye Mathisen said:
   s2# mount -t fdescfs fdescfs /dev/fd
   s2# ls -l /dev/fd
   total 16
   crw--w  1 root  tty 5,   1 Jul 28 18:01 0
   crw--w  1 root  tty 5,   1 Jul 28 18:01 1
   crw--w  1 root  tty 5,   1 Jul 28 18:01 2
   d-w---  1 mailnull  mailnull   512 Jul 23 00:01 3
   d-  1 root  wheel  512 Jul 25 03:25 4
   s2# umount /dev/fd
   
   This thing is all over the map.. permissions changed, a *directory*
   for fd's 3 and 4?  
  
  What do you expect ls to open to print a *directory* listing? :)
  
  fd's 0, 1, and 2 are /dev/tty, and the permissions look fine.
  
  fd 3 is your current directory (so I guess you're in some smtp-related
  directory?), and fd 4 is the directory on the commandline (/dev/fd).
 

 I guess I just expected it to print all character device entries for
 the file descriptors open by my process.

fdescfs prints all file desriptors open by your process, and displays
the correct info for each of them.
 
 Kind of like the old /dev/fd/1 /dev/fd/2 directories used to be under
 MAKEDEV...

Before devfs, /dev/fd was populated with dummy entries from 0 to 63 and
running ls on the directory had no correspondence with what your
process actually had open.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: fdescfs functional in 6.1?

2006-07-29 Thread Rick C. Petty
On Fri, Jul 28, 2006 at 11:16:53PM -0700, Jaye Mathisen wrote:
 I guess I just expected it to print all character device entries for the
 file descriptors open by my process.

It did-- well it printed all the file descriptors open by your process,
which in this case was ls.  0, 1, and 2 are stdin, stdout, and stderr
(respectfully) and they point to the device you logged into.  Try doing
ls -la /dev/fd | less and I'll bet 1 will be a pipe?  This seems like
the correct operation;  I'm not sure I understand what you expected and
why that's different than what you've observed.

 Kind of like the old /dev/fd/1 /dev/fd/2 directories used to be under 
 MAKEDEV...

How is that the same?  MAKEDEV was in the day before devfs, so the device
entries needed to be created by the underlying filesystem.  In devfs,
things are only present if they represent an active device.

-- Rick C. Petty
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: fdescfs functional in 6.1?

2006-07-28 Thread Dan Nelson
In the last episode (Jul 28), Jaye Mathisen said:
 devfs is mounted, fdesc is unmounted:
 
 s2# ls -l /dev/fd
 total 0
 crw-rw-rw-  1 root  wheel  250,   0 Jul 25 03:25 0
 crw-rw-rw-  1 root  wheel  250,   1 Jul 25 03:28 1
 crw-rw-rw-  1 root  wheel  250,   2 Jul 25 03:27 2
 
 Looks just like I think it should.
 
 Then:
 s2# mount -t fdescfs fdescfs /dev/fd
 s2# ls -l /dev/fd
 total 16
 crw--w  1 root  tty 5,   1 Jul 28 18:01 0
 crw--w  1 root  tty 5,   1 Jul 28 18:01 1
 crw--w  1 root  tty 5,   1 Jul 28 18:01 2
 d-w---  1 mailnull  mailnull   512 Jul 23 00:01 3
 d-  1 root  wheel  512 Jul 25 03:25 4
 s2# umount /dev/fd
 
 This thing is all over the map.. permissions changed, a *directory*
 for fd's 3 and 4?  

What do you expect ls to open to print a *directory* listing? :)

fd's 0, 1, and 2 are /dev/tty, and the permissions look fine.

fd 3 is your current directory (so I guess you're in some smtp-related
directory?), and fd 4 is the directory on the commandline (/dev/fd).

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]