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