AnyEvent and piped open
Laurent
laurent.aml at gmail.com
Tue Jul 19 03:36:36 CEST 2011
Marc,
On Sun, Jul 17, 2011 at 3:12 AM, Marc Lehmann <schmorp at schmorp.de> wrote:
> On Fri, Jul 15, 2011 at 09:25:14PM -0400, Laurent <laurent.aml at gmail.com> wrote:
>> > So, again, this really isn't a limitation (not even a "limitation") in EV,
>> > but a logical consequence of using events. Note that traditional use of
>> > popen/pclose works just fine even when EV reaps children.
>>
>> That's because you consider that an event loop should not do pooling,
>> but it can.
>> In this particular case, pooling could even happen on SIGCHLD events,
>> to make it more event-friendly.
>
> Polling, not pooling. I don't know what you mean with pooling, but it
> simply can't be done without making the event loop poll for every single
> process, which would only be needed to support buggy programs like your
> example, which can trivially be rewritten.
>
> So, no, there is no other way to implement this *in an event-based way*,
> which is the whole point of an event loop.
>
> Whatever you want to be implemented, it would just work around a design
> bug in your program.
I guess this is going off topic. Sorry about that.
My feedback was on the doc side.
Thanks.
-- Laurent
More information about the anyevent
mailing list