make wait_pipe with statement compatible