develooper Front page | perl.perl5.porters | Postings from September 2011

Re: The future of POSIX in core

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
September 2, 2011 13:59
Subject:
Re: The future of POSIX in core
Message ID:
20110902205854.GL23881@plum.flirble.org
On Fri, Sep 02, 2011 at 10:40:11PM +0200, Leon Timmermans wrote:
> On Fri, Sep 2, 2011 at 5:05 PM, Nicholas Clark <nick@ccl4.org> wrote:
> > What does this gain? I don't think that it simplifies anything.
> >
> > POSIX::SigAction would always be loaded by POSIX::SigRT (because the
> > latter uses the former) and POSIX::SigRT would always be loaded by POSIX
> > (because %POSIX::SIGRT is implemented by the methods in POSIX::SigRT)
> >
> > It would increase the number calls to stat() and open() to load POSIX,
> > without (I think) reducing in any way the compile time or runtime resources
> > needed.
> 
> It does matter in the sense that currenly «use POSIX::SigAction;»
> doesn't work. Nor does something like «use parent 'POSIX::SigSet';».

But use base will? :-) <ducks>

> In a related note, can anyone explain me what %POSIX::SIGRT is needed
> for? %SIG seems to handle real time signals just fine. Why does it use

Possibly Jarkko. It came from him in commit 3609ea0df8ff1318. There's not
much more detail in his e-mail:

http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2005-07/msg00923.html

There is also this comment in the documentation:

 but the right POSIX moves (see below) are made with
 the POSIX::SigSet and POSIX::sigaction instead of accessing the %SIG.

> *unsafe* signals? Does my second question answer my first? Why it has

I'll guess that it's only really useful if one uses the SA_SIGINFO flag
to get the extra info, and that (currently) only works with unsafe signals.

> this strange signal naming convention that differs from what the core
> ($Config{sig_name}) uses? Why is this convention not documented? Why

I don't see any POSIX RT signals in the list of signal names in config.sh
on FreeBSD or OS X. I see some names on a Linux system, but they don't
correspond to this comment in POSIX.pm

   # Allow (SIGRT)?MIN( + n)?, a common idiom when doing these things in C.

> it doesn't have tests? Has anyone ever used it for anything?

As to the rest, I don't know. "Jarkko", or "ask Jarkko" are my best guess
answers.

Nicholas Clark

Thread Previous | Thread Next


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