finish wait() and exec()