Exit minit if the child process exits

Also try to report some errors.
Need the right header files for printf and exit.