Checks for error and return pid
BlockInput()