uloop: use list.h, add support for handling sigchld