From patchwork Sun Nov 11 18:02:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 996153 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-97143-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ND5yyK5U"; dkim-atps=neutral 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 42tMDV3sFHz9s0n for ; Mon, 12 Nov 2018 05:02:33 +1100 (AEDT) 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:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=auY QT7wblYgE9OuyyLskQKMAqM3JiibX95MQglDjvTJn+M8b6KD0a8+aZOxR/qnUAGF Sy7I+7etE6zBktq43a5ULcj/NFDuZPG+b6P8DrDyfjkOlb2zRtvLSXin0KIcqM1j 8c1TZU29Asvd33PUz+bCdzfchAcVPSUheNHZgHuU= 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:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=BAXSFVunW Em+rbCPLmy5WdTjmE4=; b=ND5yyK5Uzk9flsLWvALfNaKl5buXD1HPSCHrbTUuL XvTDpiUKSnetS+kolIukLA7Q9VrnNCTSgkzLkWoOaZ0gApFBS7ufn1Yv3/iRw4du nAqn7IJsW+0yDDaPofcP5+QR98Z/j2WS357C5Gg65MrLFANm0ZQjeyAkqFJv3hn1 f4= Received: (qmail 92555 invoked by alias); 11 Nov 2018 18:02:28 -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 91615 invoked by uid 89); 11 Nov 2018 18:02:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited] hurd: Document dtable_cloexec size convention. Date: Sun, 11 Nov 2018 19:02:21 +0100 Message-Id: <20181111180221.22092-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 * sysdeps/mach/hurd/spawni.c (__spawni): Use orig_dtablesize instead of dtablesize for allocating dtable_cloexec. --- ChangeLog | 2 ++ sysdeps/mach/hurd/spawni.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ae5b4a136d..e6f42b41b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,8 @@ * hurd/Versions (_hurd_port_move): Export function. * sysdeps/mach/hurd/i386/libc.abilist (_hurd_port_move): Expect symbol. + * sysdeps/mach/hurd/spawni.c (__spawni): Use orig_dtablesize instead + of dtablesize for allocating dtable_cloexec. 2018-11-09 Martin Sebor diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c index c08f2a5b5a..b98e991d3b 100644 --- a/sysdeps/mach/hurd/spawni.c +++ b/sysdeps/mach/hurd/spawni.c @@ -405,7 +405,7 @@ __spawni (pid_t *pid, const char *file, dtable = __alloca (dtablesize * sizeof (dtable[0])); ulink_dtable = __alloca (dtablesize * sizeof (ulink_dtable[0])); dtable_cells = __alloca (dtablesize * sizeof (dtable_cells[0])); - dtable_cloexec = __alloca (dtablesize); + dtable_cloexec = __alloca (orig_dtablesize); for (i = 0; i < dtablesize; ++i) { struct hurd_fd *const d = _hurd_dtable[i];