proc_mgmt: implementation spawn_wait() with nohang flag