develooper Front page | perl.perl5.porters | Postings from October 2017

[perl #131982] getpriority and setpriority are underdocumented

From:
Tony Cook via RT
Date:
October 16, 2017 00:31
Subject:
[perl #131982] getpriority and setpriority are underdocumented
Message ID:
rt-4.0.24-22637-1508113879-1779.131982-15-0@perl.org
On Tue, 26 Sep 2017 22:27:59 -0700, tonyc wrote:
> On Tue, 26 Sep 2017 22:20:38 -0700, tonyc wrote:
> > On Mon, 11 Sep 2017 01:54:53 -0700, LeonT wrote:
> > > On Mon, Sep 11, 2017 at 2:01 AM, Tony Cook <tony@develop-help.com>
> > > wrote:
> > >
> > > > > I agree.
> > > > >
> > > > >
> > > > > I'd heard of it, but never used it.  I've never used
> > > > > (get|set)priority()
> > > > in core.
> > > > >
> > > > > I can see three solutions:
> > > > >
> > > > > 1) add the constants to Fcntl - except these constants aren't
> > > > > defined by
> > > > fcntl.h, so they don't really belong.
> > > > >
> > > > > 2) create a new core module Sys::Resource (to match
> > > > > <sys/resource.h>,
> > > > which defines the constants.  Of course this duplicates the work
> > > > BSD::Resource already does better.
> > > > >
> > > > > 3) link to BSD::Resource
> > > > >
> > > > > Out of these 3) seems the most palatable.
> > > >
> > > > Another option would be POSIX.pm, since these are defined in POSIX.
> > >
> > >
> > > As much as I dislike how bloated POSIX already is, that does feel
> > > like the
> > > most logical solution to me.
> > 
> > Patching attached.
> > 
> > I'll apply in a few days if no-one objects.
> 
> And this patch too.

Applied to blead as 4fd667a8b4c09331100c2a13db9d92f0961dfcf7 (with an added #include) and 7596fda6b1aaa11aff71a817f818bdd61bc2ae62.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=131982



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About