From patchwork Mon May 30 13:07:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 627797 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rJH3X3KwCz9snm for ; Mon, 30 May 2016 23:07:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=qmv4G5cG; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=gNHhk1indvHnmUJqqXIkFRogMkEyUQvj+3oMO5mZWux5FSmSzjADQ 5WLdoeIAp5gevhh83oHxrxqHKK8idcd7FXobB11876XnLiK6GbleW7ZeEk1CUGKH KybXpuV96Qshv0MPKTcLaw6CuL6X0LUAQcGqKsVk36Myl2e0R/BRkg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=YW1utBOI9sut9rFIvm3AAQSv4o8=; b=qmv4G5cGlcTnygF9mdSeAa59Bjzz FYDUoX4G7cXDjTb0U4EOxSeZC0OB4gzU3cCMUfa8FYa2I5+ubCuY6f6+MtOlecYj gXKx0IRwRcYvehBhe7KmqU7s3+bqLPJ95TWD8SMRFmWhGIPT0u/WlVaVpOyOYj16 KPKN85TpzuDrCdE= Received: (qmail 85223 invoked by alias); 30 May 2016 13:07:47 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 85209 invoked by uid 89); 30 May 2016 13:07:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=shortly X-HELO: mail-yw0-f177.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=yQtesLlhD9teVXk7g1zciu78JWuGQh3FblDA4AVRb3g=; b=H5qpeJsiDs8qhRzR1JmNoQ5ctQuszm7+0Oizug+t83wW9Z8bOwN1g3cZNGNp61lDAc oPIzLxO4jIKRokzH9qPSe03wwvJ9Pn42Xg3eE/ujwzMSVPBfI7OoEH7Oh4l1meI3OpUQ qqZCnVjM2tr5l6q1T/XXzgduNBTO11DnuwMT5qsxUIZ5CVXk2ARmgSJFICwbTbxQA1ml CUTIlN/jdVJ8h0KXQDp/cmm6cuOxMdMBwu4ffzX+OgFyd7PmWE5Ad9Hryjm1HtLtXo3e LuhnjntoPFUwJI/ZY0HvoJgykFl6nAcPV85eMHnlXDHO1uygJcf5Kg6PS5dEDak/uIMn 5K5Q== X-Gm-Message-State: ALyK8tIizhHrFRa4/5mxqa6GF5eVbefnkPJctqEUoeQPbMSBqq+0MafCeXoRkrvi2vJE9+EX X-Received: by 10.13.208.2 with SMTP id s2mr17525749ywd.215.1464613654440; Mon, 30 May 2016 06:07:34 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] posix: Call _exit in failure case for posix_spawn{p} (BZ#20178) Date: Mon, 30 May 2016 10:07:22 -0300 Message-Id: <1464613642-4801-1-git-send-email-adhemerval.zanella@linaro.org> This patch call _exit instead of exit in failure case for the spawned child in Linux posix_spawn{p} implementation.. Tested on x86_64. I will commit this shortly. [BZ #20178] * sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Call _exit on failure instead of exit. --- ChangeLog | 6 ++++++ sysdeps/unix/sysv/linux/spawni.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c index ee05de5..bb3eecf 100644 --- a/sysdeps/unix/sysv/linux/spawni.c +++ b/sysdeps/unix/sysv/linux/spawni.c @@ -288,7 +288,7 @@ fail: if (ret) while (write_not_cancel (p, &ret, sizeof ret) < 0) continue; - exit (SPAWN_ERROR); + _exit (SPAWN_ERROR); } /* Spawn a new process executing PATH with the attributes describes in *ATTRP.