added code to callback the handler for the child exit on a glib loop.
implemented code to collect the exit children.