From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 4AE065A026B for ; Mon, 13 Feb 2023 02:22:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676251333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ya3/JeYG/9Z778VVDogWemitgKvk2tFcp/fGCXOo9u4=; b=jSmjldck6mt7VL4uhhZXEytd7GR212uytIDCb4dRog4mDP7653MxkSW2CxuGkAb0ggrJrL ex0bikXrZUUGivElLvA1YeMBXtw+V/0d0rrhTcx4rl4Jtgy8CjA5uw0xqQp5xfpBCHucoi w03D+3+ZyOSR1J6wQjurry15bMUN2yQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-499-aAzR0LzlPSe6EmRPh46Apg-1; Sun, 12 Feb 2023 20:22:11 -0500 X-MC-Unique: aAzR0LzlPSe6EmRPh46Apg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1662A971081 for ; Mon, 13 Feb 2023 01:22:11 +0000 (UTC) Received: from maya.cloud.tilaa.com (unknown [10.33.32.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3C3B1121319; Mon, 13 Feb 2023 01:22:10 +0000 (UTC) Date: Mon, 13 Feb 2023 02:16:05 +0100 From: Stefano Brivio To: Paul Holzinger Subject: Re: [PATCH v2] pasta: propagate exit code from child command Message-ID: <20230213021605.1c484971@elisabeth> In-Reply-To: <20230209145948.20773-1-pholzing@redhat.com> References: <20230209145948.20773-1-pholzing@redhat.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: WH5YFEJW5DKFIBBR4PVZORMWJFE6CJZX X-Message-ID-Hash: WH5YFEJW5DKFIBBR4PVZORMWJFE6CJZX X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.3 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 9 Feb 2023 15:59:49 +0100 Paul Holzinger wrote: > Exits codes are very useful for scripts, when the pasta child execvp() > call fails with ENOENT that parent should also exit with > 0. In short > the parent should always exit with the code from the child to make it > useful in scripts. > > It is easy to test with: `pasta -- bash -c "exit 3"; echo $?` > > Signed-off-by: Paul Holzinger Applied, thanks for the follow-up. -- Stefano