check malloc() result
+ sigchld_handler
check for errors
update events fix
+ buffer_t