From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10284 Path: news.gmane.org!not-for-mail From: Jorge Almeida Newsgroups: gmane.linux.lib.musl.general Subject: abort() PID 1 Date: Mon, 4 Jul 2016 01:09:32 -0700 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1467619795 15202 80.91.229.3 (4 Jul 2016 08:09:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2016 08:09:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-10297-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 04 10:09:54 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bJywz-0001GY-8v for gllmg-musl@m.gmane.org; Mon, 04 Jul 2016 10:09:53 +0200 Original-Received: (qmail 1887 invoked by uid 550); 4 Jul 2016 08:09:49 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 1842 invoked from network); 4 Jul 2016 08:09:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=+YRhoMzig668dpoucRvYpvW2Mu3GHQ/3KSV3rJHNhfU=; b=b5Svd9+rZZkNJcAoisDavqPufvFvDPSPuyuKfjyhDROiw21PhM1RYXX/5/zRVt59O1 MERZIelFtW5GmeEvg8caY+UGs1d9qZAYJfWjnboEvs8vxHejZliZ5bBdRk+cSLxYz1RF 4yC42O59o88hdsxRggU9F8AkoHJAILLNFUrRSZ3ARdHyA+/MsXo8ESkm4ID5gZDot29t FFJymzlIkfdxsMkG9tB4j83dezVh4wgZgLFiQMbG6wqrTk5yp5uvJRUQxygby5AfA9Ey B2iwraTl8D6ju5gLXtwSm8ZGkN23opKOfVlduwJLBJtOTU2wVrKFQlR3fwjta3BzfgiF 9fpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+YRhoMzig668dpoucRvYpvW2Mu3GHQ/3KSV3rJHNhfU=; b=lJPLoCqR9tQOMlB/zo5uYrkSU39u2tR1GWZAq/GjG9V6cwBOFUd420gK7vgNXfvldA xeg7ORRHKi8Vh2kmx8TQUEqg/K7XAE5c5A6fcaEVrhSCpFxmM3gJc4vSP96vFZpX/csl MEYLZ/QEc24ZQrrDBat3cAx1MmjwGxsSmm22t5uUjIDUx8qiENNC4IPMCZTiQYq8fp/2 dMID5+T0pMaL0gb/CecYrM2VDYAaKshK+nhmVrHedO9RweGL4briUA7KOYz+xItuZwK9 pxLd9viMlpIV8YqH3NagUyBsFtdGOANn1+UjE7SjNyLpOrYBm/HDBUjZ7UeuzmfWcZ88 7ZyA== X-Gm-Message-State: ALyK8tJsigz9kZ2VsxwpUjALQ/dGGu7kXYKYMqkeGhq93sxTJAtB53eDoVYEsg9qwcXDFz4sprnKhbqfYFUvYw== X-Received: by 10.25.125.139 with SMTP id y133mr2873764lfc.140.1467619772875; Mon, 04 Jul 2016 01:09:32 -0700 (PDT) Xref: news.gmane.org gmane.linux.lib.musl.general:10284 Archived-At: The recent thread about abort() and PID 1 left me in a state of confusion, in a matter I thought was clear enough: What I thought I understood: - the kernel will not deliver any signal to process 1, unless a signal handler for that particular signal has been installed -if process 1 calls abort() (regardless of what purpose that would fill), then: - if a handler was setup, it should be done whatever the handler does - if a handler was not setup, nothing should happen (as in: process didn't receive any signal at all) What the standards say: (http://pubs.opengroup.org/onlinepubs/9699919799/) "The SIGABRT signal shall be sent to the calling process as if by means of raise() with the argument SIGABRT." "The effect of the raise() function shall be equivalent to calling: pthread_kill(pthread_self(), sig);" man raise(3): The raise() function sends a signal to the caling process or thread. In a single-threaded program it is equivalent to kill(getpid(), sig); So, what should " kill(1, SIGABRT)" do? It doesn't seem ambiguous to me. IOW, there's nothing special about SIGABRT regarding PID 1. DISCLAIMER: well-meaning amateur here. I'm pretty sure I understood what I quoted, but I'm assuming the standard doesn't have any self-inconsistencies. I'm also assuming the site is authoritative. So, can one trust the man pages? Thanks Jorge Almeida