From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E2A0ECAAD8 for ; Fri, 23 Sep 2022 07:53:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230425AbiIWHxt (ORCPT ); Fri, 23 Sep 2022 03:53:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231173AbiIWHxj (ORCPT ); Fri, 23 Sep 2022 03:53:39 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 455A712CCA2 for ; Fri, 23 Sep 2022 00:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663919618; 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: in-reply-to:in-reply-to:references:references; bh=iOGG5hgOKi/CJM4NK1rzcJoL+Wi8Clwwu1KXxusOWjU=; b=ffNrt3nNfiX38MwqlCwuzBQmzhH15GWYloGCXXdniU5to+K/ro216mPO7lkPN4UWGx6LCt deJ42y/CqfnevyN27/xOBSakpuZ2h3EswG4OMfNHCUkL54LFJl92mhXb/Di2lARJL6gXrI 5PT7lGjEqyq4X31Bf1TKQiMweF00s6E= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-106-_i6V8lngNXajPEiNifPUOQ-1; Fri, 23 Sep 2022 03:53:34 -0400 X-MC-Unique: _i6V8lngNXajPEiNifPUOQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 78F333817A74; Fri, 23 Sep 2022 07:53:33 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 201D640C6E14; Fri, 23 Sep 2022 07:53:31 +0000 (UTC) From: Florian Weimer To: cambda@linux.alibaba.com Cc: "Eric W. Biederman" , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Xuan Zhuo , Dust Li , Tony Lu Subject: Re: Syscall kill() can send signal to thread ID References: <69E17223-F0CA-4A4C-AAD7-065D6E6266D9@linux.alibaba.com> <87pmfn5tu1.fsf@email.froward.int.ebiederm.org> <87r102ejwo.fsf@oldenburg.str.redhat.com> <0CC7D0E7-71C5-4DAC-8A01-F9E13659F864@linux.alibaba.com> Date: Fri, 23 Sep 2022 09:53:30 +0200 In-Reply-To: <0CC7D0E7-71C5-4DAC-8A01-F9E13659F864@linux.alibaba.com> (cambda@linux.alibaba.com's message of "Fri, 23 Sep 2022 14:25:05 +0800") Message-ID: <87illeedc5.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org > I don't quite understand what you mean, sorry. But if kill() returns > -ESRCH for tid which is not equal to tgid, kill() can only send signal > to thread group via main thread id, that is what BSD did and manual > said. It seems not odd? It's still odd because there's one TID per process that's valid for kill by accident. That's all. Thanks, Florian