fa.netbsd.tech.kern
[Top] [All Lists]

Re: cloning devices and DTYPE_MISC

Subject: Re: cloning devices and DTYPE_MISC
From: christos@xxxxxxxxxx (Christos Zoulas)
Date: Tue, 22 Jul 2008 19:19:26 UTC
Newsgroups: fa.netbsd.tech.kern

In article <200807221501.m6MF1eXr014213@xxxxxxxxxxxxx>,
Matthew Mondor <mm_lists@xxxxxxxxxxxxxxx> wrote:
>On Monday, 21 Jul 2008 5:43:16
>Thor Lancelot Simon <tls@xxxxxxxxxxxxxxx> wrote:
>
>> fd_clone() explicitly sets the type of the cloned file to
>> DTYPE_MISC.One annoying effect this has is that it makes it hard
>> to look at a processthat has several cloned devices open and see
>> which is which.
>
>> It also makes it very hard for pseudodevices which have ioctls
>> thatoperate on file descriptors to tell which are "their own"
>> though thereare other means of dealing with that.
>
>Speaking of fdclone(), I have the pending kern/37878 PR which also
>relates to DTYPE_MISC;
>
>Now that I quickly checked fstat(1) again I noticed that there are
>cases for various other DTYPE_ although not for DTYPE_MISC, and that
>it skips unknown types (only printing a warning about the descriptor
>if -v switch is used).
>
>I'm not sure if fstat(1) or fdclone(2) should be corrected about this
>or both (procfs does list those fine).

I fixed that at 2008-04-04 although the fix is sub-optimal. I.e. no information
is being told about DTYPE_MISC.

christos


<Prev in Thread] Current Thread [Next in Thread>