[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

HAVE_WAITPID



Hi,

        The source code for fvwm95 has the following code in fvwm/misc.h :

#ifdef HAVE_WAITPID
#define ReapChildren()  while ((waitpid(-1, NULL, WNOHANG)) > 0);
#else
#define ReapChildren()  while ((wait3(NULL, WNOHANG, NULL)) > 0);
#endif

        Now linux (atleast, for 2.0.36) does have the waitpid function.
However, because the HAVE_WAITPID macro is not defined in the standard
includes, the ReapChildren macro is defined as the call to wait3 (which is
also defined in Linux).

        What is the status of the HAVE_WAITPID macro? Is it the standard
way to recognize whether the waitpid call is defined for the OS, or is
this some arbitrary test that the fvwm95 author came up with? If it is the
former, shouldnt it be added to features.h or something like that?

Thanks in advance,
Jor-el


Reply to: