From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f65.google.com (mail-lf1-f65.google.com [209.85.167.65]) (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 1108B4696C3 for ; Fri, 10 Apr 2020 11:28:24 +0300 (MSK) Received: by mail-lf1-f65.google.com with SMTP id m19so811078lfq.13 for ; Fri, 10 Apr 2020 01:28:24 -0700 (PDT) Date: Fri, 10 Apr 2020 11:28:22 +0300 From: Cyrill Gorcunov Message-ID: <20200410082822.GN3072@uranus> References: <0a37f62adb35dd6257d93a90b2176093700bcf51.1586486220.git.alexander.turenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a37f62adb35dd6257d93a90b2176093700bcf51.1586486220.git.alexander.turenko@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 10/13] popen: add missed diag_set() in popen IO functions List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Turenko Cc: tarantool-patches@dev.tarantool.org On Fri, Apr 10, 2020 at 05:50:48AM +0300, Alexander Turenko wrote: > Our usual convention for C code is to return a negative value at failure > and set an entry to the diagnostics area. > > When code uses this convention consistently, it is much easier to handle > failures when using it: you always know where to find an error type and > message and how to pass the error to a C or Lua caller. > > See also the previous commit ('popen: add missed diag_set in > popen_signal/delete'). > > Part of #4031 Acked-by: Cyrill Gorcunov