On Sat, 12 Mar 2016 18:44:18 +0200, Lars Noodén wrote: > The snippet below works to fork as a specific user, if run as root. > However, it generates zombies. The functions wait() or waitpid() seem > to be available to use to stop that, but if I insert either of them in > the outer while loop, only one client can connect at a time. > > What modification can prevent zombies yet allow multiple concurrent > clients to attach?
You need the WNOHANG option on your wait() to make it nonblocking. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=9780133036268 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/