lkml.org 
[lkml]   [2011]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Add cloexec information to fdinfo
    On 29/06/11 09:15, Ulrich Drepper wrote:
    > On 06/28/2011 01:23 PM, Linus Torvalds wrote:
    >> The description makes no mention of why this would be needed?
    >
    > In this specific case I was trying to re-implement the pfiles program.
    > For normal file descriptors (not sockets) this was the last piece of
    > information which wasn't available. This is all part of my "give
    > Solaris users no reason to not switch" effort. I intend to offer the
    > code to the util-linux-ng maintainers.

    For the curious (me):

    solaris:~ > pfiles $$
    8418: -bash
    Current rlimit: 256 file descriptors
    0: S_IFCHR mode:0620 dev:349,28 ino:130202 uid:11003 gid:7 rdev:24,116
    O_RDWR|O_NOCTTY|O_LARGEFILE
    /dev/pts/116
    1: S_IFCHR mode:0620 dev:349,28 ino:130202 uid:11003 gid:7 rdev:24,116
    O_RDWR|O_NOCTTY|O_LARGEFILE
    /dev/pts/116
    2: S_IFCHR mode:0620 dev:349,28 ino:130202 uid:11003 gid:7 rdev:24,116
    O_RDWR|O_NOCTTY|O_LARGEFILE
    /dev/pts/116
    3: S_IFDOOR mode:0444 dev:347,0 ino:189 uid:0 gid:0 size:0
    O_RDONLY|O_LARGEFILE FD_CLOEXEC door to nscd[11276]
    /var/run/name_service_door
    255: S_IFCHR mode:0620 dev:349,28 ino:130202 uid:11003 gid:7 rdev:24,116
    O_RDWR|O_NOCTTY|O_LARGEFILE FD_CLOEXEC
    /dev/pts/116

    I guess `lsof +f g` could be suitably embellished as well.

    cheers,
    Pádraig.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-06-29 12:55    [W:4.426 / U:0.004 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site