On Tue, 22 Jan 2008, Keisuke MORI wrote: > Lars Marowsky-Bree <[EMAIL PROTECTED]> writes: > > [...] > > Instead of scanning /proc, which is very very Linux-specific, why not > > use the async waitpid call instead? Or, you might decide to > > poll()/select()/inotify() on the relevant proc dirs at least. > > Yes, we're aware that the current implementation is very Linux > specific, and we're grad to modify it to be more portable. > > But for those techniques, waitpid() can handle only its child > process and it can not be used to monitor a process launched > by heartbeat. By using poll()/select()/inotify(), it can not be > detect if a process gets to "the zombie state" as long as we studied. > Please let me know if I'm wrong, or there's better way to do this. > > For the meantime, why don't we start from "Linux only" as the > start point and fix it more portable upon users demands?
In an ideal world, I would offer to review and assist from a portability perspective (using Solaris as a test). But, alas, my world is not currently ideal. So for the moment could I ask that you simply note where such problems are? If at all possible, could you put in some "autoconf" stuff in "configure.in", with suitable "#if ... #else ..." in the source, where the "#if" bit is your Linux code, and the "#else" some sort of failure handling. (Hint: Be alert to typing an absolute pathname in your code. The moment you spot that, say "Non-portable. What structure do I need in place to handle the other systems?") Then most of the issues will at least have been noted. And when someone arrives with another (and in our context minority) environment, the source will have the basic structure to handle it with a run-time warning/error, and that run-time warning/error will have a reasonable chance of being relatively useful, rather than an unanticipated error for a beginner user. Sorry I cannot offer more at present. Best wishes. -- : David Lee I.T. Service : : Senior Systems Programmer Computer Centre : : UNIX Team Leader Durham University : : South Road : : http://www.dur.ac.uk/t.d.lee/ Durham DH1 3LE : : Phone: +44 191 334 2752 U.K. : _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
