> -----Original Message----- > From: Daniel Pocock [mailto:[email protected]] > Sent: Wednesday, December 02, 2009 6:49 AM > To: Carlo Marcelo Arenas Belon > Cc: [email protected]; Ganglia > Subject: Re: [Ganglia-developers] [Ganglia-general] Ganglia 3.1.5 beta > ready for final testing > > > > fork() doesn't work because the kqueue filehandle is not inherited; > using > > rfork() instead doesn't either because all filehandles are closed by > doing > > exit(0) in the parent and so fails in the same way that changing > > apr_proc_detach() does when changed to use rfork() instead. > > > I'm not a BSD expert, do you know if there is any ioctl or something > that can be used to tell BSD to keep the file descriptors for the child > process? > > [Gladish, Jacob]
There's a specific section that states that the fd returned from kqueue() is not inherited following a fork(). There is info about using rfork(), which means patching apr. I would avoid that. http://people.freebsd.org/~jmg/kqueue.historic.man.html The openbsb manpage has a little more info about rfork() and the flags it uses. http://resin.csoft.net/cgi-bin/man.cgi?sektion=2&topic=kqueue In general, I think would be better to daemonize the gmond as early as possible to avoid these types of issues. Is there any reason why the call to daemonize_if_necessary() call cannot be moved up in main to be right before the call to load_metric_modules()? It looks like the only real difference would be that any errors encountered setting up the send/receive sockets would be reported via syslog instead of stdout. > -------------------------------------------------------------------------- > ---- > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Ganglia-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/ganglia-developers IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses. ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
