From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4971946970E for ; Thu, 26 Dec 2019 10:14:43 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id 9so17925342lfq.10 for ; Wed, 25 Dec 2019 23:14:43 -0800 (PST) Date: Thu, 26 Dec 2019 10:14:41 +0300 From: Konstantin Osipov Message-ID: <20191226071441.GB6901@atlas> References: <20191217125420.20881-1-gorcunov@gmail.com> <20191217125420.20881-3-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191217125420.20881-3-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH v6 2/4] popen: Introduce a backend engine List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml * Cyrill Gorcunov [19/12/17 15:57]: > +ssize_t > +popen_read_timeout(struct popen_handle *handle, void *buf, > + size_t count, unsigned int flags, > + ev_tstamp timeout) > +{ > + int idx = flags & POPEN_FLAG_FD_STDOUT ? > + STDOUT_FILENO : STDERR_FILENO; > + > + if (!popen_may_io(handle, idx, flags)) > + return -1; > + > + if (count > (size_t)SSIZE_MAX) { > + errno = E2BIG; > + return -1; > + } > + > + if (timeout < 0.) > + timeout = TIMEOUT_INFINITY; > + > + say_debug("popen: %d: read idx [%s:%d] buf %p count %zu " > + "fds %d timeout %.9g", > + handle->pid, stdX_str(idx), idx, buf, count, > + handle->fds[idx], timeout); > + > + return coio_read_fd_timeout(handle->fds[idx], > + buf, count, timeout); > +} Right, so could you please use struct coio here, and not coio_read_fd_timeout? I.e. convert handle->fds to coio? -- Konstantin Osipov, Moscow, Russia