From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Florian Weimer Newsgroups: gmane.comp.lib.glibc.alpha Subject: Re: [PATCH 3/3] Refactor atfork handlers Date: Wed, 7 Feb 2018 16:07:03 +0100 Message-ID: References: <1518008967-8310-1-git-send-email-adhemerval.zanella@linaro.org> <1518008967-8310-3-git-send-email-adhemerval.zanella@linaro.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1518015914 29061 195.159.176.226 (7 Feb 2018 15:05:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Feb 2018 15:05:14 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 Cc: libc-alpha@sourceware.org To: Adhemerval Zanella Original-X-From: libc-alpha-return-90106-glibc-alpha=m.gmane.org@sourceware.org Wed Feb 07 16:05:10 2018 Return-path: Envelope-to: glibc-alpha@blaine.gmane.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=tvE1S+TxuPYa7ru8 ZW/Tda81rhEZ8zJpRevYZqitANqOn3NVhxsumjZjvqtW1GwTvPnnSilmuVM3trW6 sYFU4cTlkYhcMEOf5eCD67R0g+w8U4lWbdbci27vfYj04kvoS/0vW/Y9YNT2aIkw 0DAZdhBp9k5asrWCmXtM6iBw4n0= 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:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Uo47FhtSRmYBqH+j1lpJRJ 8j+0I=; b=ayqgw65LWEVmY416RQVN1lZIrkpjQ0xgT9jiXnOpYh+hGw84k7JSJ/ V8l41iFJqUYpjkKT5yNwoKtnFiZVfCvFp/1fu58X61jzXddjczyAI4sJx5Ajemm2 LxDgOIhTlJEQABp6oatVAToALmNa84njKpfyp2YVrCKAqLUMfKMOU= 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: , Original-Sender: libc-alpha-owner@sourceware.org Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,SPF_HELO_FAIL,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: mx1.redhat.com In-Reply-To: <1518008967-8310-3-git-send-email-adhemerval.zanella@linaro.org> Xref: news.gmane.org gmane.comp.lib.glibc.alpha:82454 Archived-At: Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejRHY-0007AH-Ct for glibc-alpha@blaine.gmane.org; Wed, 07 Feb 2018 16:05:08 +0100 Received: (qmail 94340 invoked by alias); 7 Feb 2018 15:07:09 -0000 Received: (qmail 94331 invoked by uid 89); 7 Feb 2018 15:07:08 -0000 On 02/07/2018 02:09 PM, Adhemerval Zanella wrote: > + for (size_t i = 0; i < fork_handler_list_size (&fork_handlers); i++) > + if (fork_handler_list_at (&fork_handlers, i)->dso_handle == dso_handle) > + { > + fork_handler_list_remove (&fork_handlers, i); > + break; > + } I think there can be multiple fork handlers for one dso_handle, and this loop only removes one of them. Thanks, Florian