ipc_receive(): stop waiting if channel closes