This queue is for tickets about the Linux-Fuser CPAN distribution.

Report information
The Basics
Id:
43979
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
jns [...] gellyfish.co.uk
Requestors:
CRAKRJACK [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
Wishlist
Broken in:
(no value)
Fixed in:
1.5



Subject: Please include file descriptor numbers as part of proccess objects
Hi, You are returning multiple process info objects for a process if that process has the file opened more than once. According to RT#12067, this is intentional. However, there is nothing to distinguish one of these objects from another. Can you please add an accessor to the process objects that returns the processes' file descriptor numbers? In my code, I'm having to go back and traverse the /proc filesystem again to pick up this information after Linux::Fuser has told me the relevant information. I guess these objects would then be better considered "Descriptor" objects than "Process" objects... :-) Thanks, Tyler
Subject: Re: [rt.cpan.org #43979] Please include file descriptor numbers as part of proccess objects
Date: Tue, 10 Mar 2009 10:10:43 +0000
To: bug-Linux-Fuser@rt.cpan.org, tyler@yi.org
From: Jonathan Stowe <jns@rabidgravy.com>
Hi, 2009/3/9 CRAKRJACK via RT <bug-Linux-Fuser@rt.cpan.org>:
Show quoted text
> Mon Mar 09 18:00:29 2009: Request 43979 was acted upon. > Transaction: Ticket created by CRAKRJACK >       Queue: Linux-Fuser >     Subject: Please include file descriptor numbers as part of proccess objects >   Broken in: (no value) >    Severity: Wishlist >       Owner: Nobody >  Requestors: CRAKRJACK@cpan.org >      Status: new >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43979 > > > > Hi, > >  You are returning multiple process info objects for a process if that > process has the file opened more than once. According to RT#12067, this > is intentional. However, there is nothing to distinguish one of these > objects from another. Can you please add an accessor to the process > objects that returns the processes' file descriptor numbers? In my code, > I'm having to go back and traverse the /proc filesystem again to pick up > this information after Linux::Fuser has told me the relevant information. > >  I guess these objects would then be better considered "Descriptor" > objects than "Process" objects... :-) >
That sounds relatively sensible :-) In order to maintain some modicum of backward compatibility I'm going to retain the Linux::Fuser::Procinfo and add to it another member which will return a Linux::Fuser::FileDescriptor which will have the FD number and the contents of the fdinfo. If I get a minute I might get this out today but definitely this week. /J\ -- http://rabidgravy.com/ - Music http://gellyfish.co.uk/ - Everything else
Subject: Re: [rt.cpan.org #43979] Please include file descriptor numbers as part of proccess objects
Date: Tue, 10 Mar 2009 14:15:09 +0000
To: bug-Linux-Fuser@rt.cpan.org, tyler@yi.org
From: Jonathan Stowe <jns@rabidgravy.com>
Hi, 2009/3/10 Jonathan Stowe <jns@rabidgravy.com>:
Show quoted text
> Hi, > 2009/3/9 CRAKRJACK via RT <bug-Linux-Fuser@rt.cpan.org>:
>> Mon Mar 09 18:00:29 2009: Request 43979 was acted upon. >> Transaction: Ticket created by CRAKRJACK >>       Queue: Linux-Fuser >>     Subject: Please include file descriptor numbers as part of proccess objects >>   Broken in: (no value) >>    Severity: Wishlist >>       Owner: Nobody >>  Requestors: CRAKRJACK@cpan.org >>      Status: new >>  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43979 > >> >> >> Hi, >> >>  You are returning multiple process info objects for a process if that >> process has the file opened more than once. According to RT#12067, this >> is intentional. However, there is nothing to distinguish one of these >> objects from another. Can you please add an accessor to the process >> objects that returns the processes' file descriptor numbers? In my code, >> I'm having to go back and traverse the /proc filesystem again to pick up >> this information after Linux::Fuser has told me the relevant information. >> >>  I guess these objects would then be better considered "Descriptor" >> objects than "Process" objects... :-) >>
> > That sounds relatively sensible :-)  In order to maintain some modicum > of backward compatibility I'm going to retain the > Linux::Fuser::Procinfo and add to it another member which will return > a Linux::Fuser::FileDescriptor which will have the FD number and the > contents of the fdinfo.  If I get a minute I might get this out today > but definitely this week.
I've uploaded Linux::Fuser 1.5 which provides a filedes() method to the Linux::Fuser::Procinfo which returns a Linx::Fuser::FileDescriptor which provides access to the FD number and the details from /proc/$pid/fdinfo Bear in mind that the fdinfo is only available in relatively recent kernels (from 2.6.22 onwards) and may change at some point (there are pending patches I've seen) /J\ -- http://rabidgravy.com/ - Music http://gellyfish.co.uk/ - Everything else
released Linux::Fuser 1.5
Subject: Re: [rt.cpan.org #43979] Please include file descriptor numbers as part of proccess objects
Date: Thu, 19 Mar 2009 18:50:59 -0700
To: Jonathan Stowe via RT <bug-Linux-Fuser@rt.cpan.org>
From: Tyler MacDonald <tyler@yi.org>
Jonathan Stowe via RT <bug-Linux-Fuser@rt.cpan.org> wrote:
Show quoted text
> I've uploaded Linux::Fuser 1.5 which provides a filedes() method to > the Linux::Fuser::Procinfo which returns a Linx::Fuser::FileDescriptor > which provides access to the FD number and the details from > /proc/$pid/fdinfo > > Bear in mind that the fdinfo is only available in relatively recent > kernels (from 2.6.22 onwards) and may change at some point (there are > pending patches I've seen)
Nice!! I've uploaded File::Lock::Multi 0.03 up to CPAN, which takes advantage of this, and provides a (messier) solution for non-linux users. Thanks, Tyler
Uploaded a 1.6


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.