Note: the source code in wait4.c came from Solaris sources and should be treated appropriately.