update wait system call