On Fri, Dec 11, 2009 at 01:21:20PM +0000, Daniel Pocock wrote: > >> it replaces apr_proc_detach with an inline implementation of it on plain >> POSIX and that should be most likely as portable (at least for the platforms >> we care of) and doesn't intentionally include any error checking to make it >> > How about Cygwin and mingw? I'm not sure if the use of pipe(), fork(), > etc is possible there
cygwin works AFAIK as that is part of the interface they emulate for you on windows. mingw (assuming any native windows solution) could be probably made to work in the long run but would assume that using apr_proc_detach() will be a better idea of portability in the long run, luckily (and remember this fix in context of a showstopper to 3.1.6) ganglia 3.1 doesn't even have the native windows support from trunk backported yet and so is a non issue for now. > I think we need to take a broader decision about the way we support the > Windows platform anyway, we may not need to support detach on that > platform. With Cygwin or with mingw, we should be able to include > native code for running as a service. apr_proc_detach() is such code and could be used whenever a native windows gmond is created IMHO. > So my proposal would be that we extend Carlo's concept so that there are > two variations of it, using #ifdef : > > - a UNIX variation of gmond that has detach functionality implemented > with fork, pipe, etc > > - a Windows variation of gmond that has built in support for running as > a service > > The cygrunsrv source code here provides us with an example of how to go > about it: > > http://sourceware.org/cgi-bin/cvsweb.cgi/cygrunsrv/?cvsroot=cygwin-apps#dirlist again, considering that there is no "native" gmond yet that would require this doing the code inside ganglia for this would need to be considered when that is needed. > What do people think about having this type of native code in gmond > rather than just using apr? Or should we try to patch apr to provide > the functionality? use apr makes more sense, since you already have the code for it available but using apr AS-IS might be problematic for the currently proposed solution to this communication but AFAIK not a blocker now since there is no need for it yet, even in trunk (where only libmetrics can be build natively in windows using mingw) Carlo ------------------------------------------------------------------------------ Return on Information: Google Enterprise Search pays you back Get the facts. http://p.sf.net/sfu/google-dev2dev _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
