rewrite sys_wait() and sys_vanish().