wait is not a Linux system call, just emulate it