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

Re: [perl #127794] Strange behavior when forking in BEGIN

Thread Previous | Thread Next
From:
Sawyer X
Date:
December 18, 2017 15:38
Subject:
Re: [perl #127794] Strange behavior when forking in BEGIN
Message ID:
0a10ac2a-421d-5a23-ffeb-4967ece08db6@gmail.com
Could you expand on your use-case, Chad?

On 12/18/2017 05:23 PM, Chad Granum wrote:
> I have code that forks in BEGIN and works around this issue, I would
> oppose making fork in begin fatal. That said I would be fine with a
> warning which I could disable int he cases I really need to.
>
> That said, I would greatly prefer some kind of fix, though I
> understand that is probably not gonna happen.
>
> -Chad
>
> On Sun, Dec 17, 2017 at 5:18 AM, slaven@rezic.de
> <mailto:slaven@rezic.de> via RT <perlbug-followup@perl.org
> <mailto:perlbug-followup@perl.org>> wrote:
>
>     Dana Sun, 17 Dec 2017 02:10:02 -0800, hv reče:
>     > On Sat, 16 Dec 2017 00:40:06 -0800, zefram@fysh.org
>     <mailto:zefram@fysh.org> wrote:
>     > > This kind of strangeness is only what should be expected from forking
>     > > in a BEGIN block.  This ticket should be closed.
>     >
>     > What who should expect - someone intimately familiar with perl
>     > internals, or someone who uses perl and (on a good day) may have
>     read
>     > `perldoc -f fork`?
>     >
>     > The preceding discussion suggests to me that an attempt to fork() at
>     > BEGIN time should yield at least a warning (and maybe a fatal error)
>     > to reflect the fact perl will not be able to honour a reasonable
>     non-
>     > expert's expectations of what that means.
>
>     Probably there are legitimate uses of fork() in a BEGIN block ---
>     I would expect that a fork+exec here is harmless.
>
>     Regards,
>         Slaven
>
>
>
>     ---
>     via perlbug:  queue: perl5 status: open
>     https://rt.perl.org/Ticket/Display.html?id=127794
>     <https://rt.perl.org/Ticket/Display.html?id=127794>
>
>

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