Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp321184rdb; Thu, 15 Feb 2024 00:44:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUrblnpPJfwejuHNNCXuZ1SuFO6at5yHR261py/c2leYWkRVzzLOn52mPWyQACQqtWuG4kmwl7meIgwCZItawc5Lmt+jua4LndWK0AYzw== X-Google-Smtp-Source: AGHT+IFK0wUw9wstF0hJ0kqYSDN8PaZWwAto0vQ9R7iGx0nxETvQZS5NW4G5aDpjDL8EtMV+jHPe X-Received: by 2002:a17:90a:fa46:b0:296:2101:5d35 with SMTP id dt6-20020a17090afa4600b0029621015d35mr970292pjb.44.1707986644070; Thu, 15 Feb 2024 00:44:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707986644; cv=pass; d=google.com; s=arc-20160816; b=hByWDPzpTyDyodWsc6rtua1eFuK7Fndbp6cgzCpiCp9G37MGtZL1OMpzOP/3x5+kvA ai2LchqWQwKVq8Rb1MvubqCSidQdKihENle/4a3qYKr3e+Rdp5Yl1EbUxDTa/+nB4b0l rKYA6gfj02cyEWeiQcXZ6U+DUKwBc2Y25ooPKcqgkZbMZVpOc3HmjNh4AkHxH98o1X5C 5TmOtprDzBW8YlrOO6Sytyx80jnFJ8rBTv7m8LC/k/fpcKAu/w1PMeb0uojmMqUXxZ7P KOzkRZ49QcM9WuGU7E3K1fG9wFZywc/jrNJnJ+w1w2YDVpKYx4eszwjxdtUDKXLnlTQZ HxCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-signature; bh=oFr2SS4bZB9XrUiyjZsI9S6F2CKS7qQrFjyLbaKAiWc=; fh=SOx4WFv7AM7wrYzias9PeuiKHlbZ+LHZkAJuP/dRiyk=; b=PXlMj6zC8wNEUbTwGTE0RF4z4ILCl8CGIjQxUcLilKOrpETzq8GLlsJUht2KPq2Pkv CS3e8P6N4Hbx1Rx67zKmNErHEz0wb1Rw3AvgC47ztR/U3pY7nmWAeMprp1m6lIVXOB8p gryRZWX8F2ZLRVbUKXHDNzwLj+/Uckvb59mMsnHbnkKmtg+DoystgENoBlqrKHbC2GRF U5hKrx1qj2e08Lz+lu7KAsv4yoHmwULiJlOU/kzK5dgarUrAKSsQqhV9M/zmIEc/tJUO Nwf02oT6C4zqj19sJybMWKHobby9+FE5f+QiCHpcEzT3URGnRYBtXEKxWnIoz2orf0g9 33wQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=dsRLlnzE; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b="Xd/vXdir"; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1893-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c31-20020a17090a492200b00298c07d68b7si2600653pjh.106.2024.02.15.00.44.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 00:44:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=dsRLlnzE; dkim=temperror (no key for signature) header.i=@ew.tq-group.com header.s=dkim header.b="Xd/vXdir"; arc=pass (i=1 spf=pass spfdomain=ew.tq-group.com dkim=pass dkdomain=tq-group.com dmarc=pass fromdomain=ew.tq-group.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1893-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9DC4F28B4EF for ; Thu, 15 Feb 2024 08:40:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECBE5134D2; Thu, 15 Feb 2024 08:40:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b="dsRLlnzE"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b="Xd/vXdir" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1911134C3 for ; Thu, 15 Feb 2024 08:40:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.104.207.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707986439; cv=none; b=glYgx/7vECWO8aZkzE/uuYOVAIsbaxSZ+NgtMya/sJkUFJjr3PyqbUgNyN+G/ZQPauijiuZpNzehm75JxJM5YUW0QY3o9ciY/lwlMvgg+nS4uQGlZLZj/makoPzdk661f6LMBIYj4PsJejDk7AMWevEt+dfmXyQe4swJhBGVfrM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707986439; c=relaxed/simple; bh=l7gjk1oUl/83P+XdzIDHJaVGXIDigPODJjb4/ofdmU4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FtwROSqXlebpBk+O7Ax4KG/g/gvEkCCgX4yIyoCTI8E/JEDHEu3OGTUIowb3HiKEwX18cAlSRGcEAQMTrbDnJ5PnJeUwli/1CiGYC8Qm+dZ+lz3zvLsXDLh5HOyxL1Gpa2sJa8ZQW0f/Ht2CQJG9OioZzdciBNOxz2C7zTgm3BE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com; spf=pass smtp.mailfrom=ew.tq-group.com; dkim=pass (2048-bit key) header.d=tq-group.com header.i=@tq-group.com header.b=dsRLlnzE; dkim=fail (0-bit key) header.d=ew.tq-group.com header.i=@ew.tq-group.com header.b=Xd/vXdir reason="key not found in DNS"; arc=none smtp.client-ip=93.104.207.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ew.tq-group.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1707986435; x=1739522435; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oFr2SS4bZB9XrUiyjZsI9S6F2CKS7qQrFjyLbaKAiWc=; b=dsRLlnzE4lJ1BxeF4kabSmcrsIsoXzunlSIsxANnk5X5EMIcxTR8aIU3 ttqBRrsMNX6NPKQkrluczg6t+KwTO/ZfHPmhqpF0cNm0BracCriKNEs5s 423BI3wRJ9jYRzcSt8myCc8JP2jcMfuQjK1/lZpB6AJVnb+2CTN6Ok5IT N0sr3cAwB8r9FolzgOWWVXoU+fd5Pm3IAaCwCCy1shmlqjvSunOA6ERGG UWDdGLY/4jrwwnN1suHTaOCiF7WDL1T7qCOwwMVPJbQZnJkVRragDI/a6 LFEn2ZAfYQ+bfOZlyAIdETCDlFKb07Q1HVvRuelWebRfYxWDoCTsvYn1P g==; X-IronPort-AV: E=Sophos;i="6.06,161,1705359600"; d="scan'208";a="35418179" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 15 Feb 2024 09:40:28 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 79547172221; Thu, 15 Feb 2024 09:40:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1707986428; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=oFr2SS4bZB9XrUiyjZsI9S6F2CKS7qQrFjyLbaKAiWc=; b=Xd/vXdirtFS8BrqP0dLFp2jBBh4cmixbFxMO5h6kPKNHpKsZhxmweOhQZI2L9EydcAhEUk YPvDKwONC+UOcESwWvCwrAvgnZucdT86VEQsbZ++LETe0JpfteIBqpIypVkXn3WqOw2Zdj +qXSl6U8+Q9wIknbAMcY6URRSgY3XVXB0kQ/KLb+jUJQP+rbEPzrFxkrJbkFRedrwMZbsN dvI//7B+K1uAzoNjpH6pQNGYdxgdCu2UblSRoC8Jl+dkGnkiT0aHhEhyWo+V5PcLZOwq1P HGELFEdXTH071xHQA8wRmyEVqcB+d8Q233qrzW+Dh1PBM7n+pHt98VTsMXAvWg== From: Matthias Schiffer To: linux-bluetooth@vger.kernel.org Cc: oss@ew.tq-group.com, Matthias Schiffer Subject: [PATCH BlueZ 2/2] tools/rfcomm: _exit() on execvp() failure Date: Thu, 15 Feb 2024 09:39:54 +0100 Message-ID: <20240215083954.5233-2-matthias.schiffer@ew.tq-group.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240215083954.5233-1-matthias.schiffer@ew.tq-group.com> References: <20240215083954.5233-1-matthias.schiffer@ew.tq-group.com> Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 When the exec fails, the child process must be terminated instead of continuing as a second main process. --- tools/rfcomm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/rfcomm.c b/tools/rfcomm.c index f635d4aef..0139fe69b 100644 --- a/tools/rfcomm.c +++ b/tools/rfcomm.c @@ -234,7 +234,7 @@ static void run_cmdline(struct pollfd *p, sigset_t *sigs, char *devname, i = execvp(cmdargv[0], cmdargv); fprintf(stderr, "Couldn't execute command %s (errno=%d:%s)\n", cmdargv[0], errno, strerror(errno)); - break; + _exit(EXIT_FAILURE); case -1: fprintf(stderr, "Couldn't fork to execute command %s\n", cmdargv[0]); -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/