There's no guarantee that SIGCHILD isn't set, so I can't use that. Ran into that issue in Mojo::IOLoop::ReadWriteFork.
Please open a PR with tests if you want to improve it. On Tuesday, July 11, 2017 at 5:08:51 AM UTC+2, Charlie Brady wrote: > > > On Mon, 10 Jul 2017, Jan Henning Thorsen wrote: > > > The reason why you're seeing the polling is because of the > implementation > > in the CGI plugin. You can see it > > here: > https://github.com/jhthorsen/mojolicious-plugin-cgi/blob/master/lib/Mojolicious/Plugin/CGI.pm#L35 > > > There might be portability issues to non-POSIX environments, but you can > avoid the polling by using "the selfpipe trick". Install a proper > SIGCHILD hander instead of using a polling loop to detect exiting child > processes. > > Your sigchild handler just needs to write a single byte into the pipe > where your event loop poll can detect it and do whatever is required. > > https://cr.yp.to/docs/selfpipe.html > https://www.sitepoint.com/the-self-pipe-trick-explained/ > https://lwn.net/Articles/177897/ > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
