From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10289 Path: news.gmane.org!not-for-mail From: Igmar Palsenberg Newsgroups: gmane.linux.lib.musl.general Subject: Re: abort() PID 1 Date: Mon, 4 Jul 2016 15:30:23 +0200 (CEST) Message-ID: References: <20160704093140.GH19691@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1467639680 2554 80.91.229.3 (4 Jul 2016 13:41:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2016 13:41:20 +0000 (UTC) Cc: Jorge Almeida To: musl@lists.openwall.com Original-X-From: musl-return-10302-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jul 04 15:41:14 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 1bK3wr-0001gT-88 for gllmg-musl@m.gmane.org; Mon, 04 Jul 2016 15:30:05 +0200 Original-Received: (qmail 21967 invoked by uid 550); 4 Jul 2016 13:29:59 -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 21949 invoked from network); 4 Jul 2016 13:29:58 -0000 DKIM-Filter: OpenDKIM Filter v2.10.3 s1.palsenberg.com u64DUNbh003886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palsenberg.com; s=s1; t=1467639025; bh=i4G0YMGv6ThTNdFM+/eeJjlazy9H+EEwaZ1PvNISH/c=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=EBroO7JGEAEuhmoBiXnqLV36ET+PVxSqQS5qcI3V6xVLPa/gqCAAiyAm6K1j+hG/0 mNMGQ5+Y8Ym23Fsbk3Nqt1AoVBCUxxZQs1eqGfAMHd7+T9zOkiiiKGCYY/7Obx8DTB wIvkDB+BOLfcYZ6l13RM7uHDpOyKA//5UdpC3oeM= In-Reply-To: <20160704093140.GH19691@port70.net> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.5.16 (s1.palsenberg.com [127.0.0.1]); Mon, 04 Jul 2016 15:30:24 +0200 (CEST) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on s1.palsenberg.com Xref: news.gmane.org gmane.linux.lib.musl.general:10289 Archived-At: > > - the kernel will not deliver any signal to process 1, unless a signal > > handler for that particular signal has been installed > > > > not all signals behave that way. For pid 1 this is the case. Unless some signals are exempt from this. > > -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) > > > > this is raise(SIGABRT), abort is different. Different how ? The manual says it's just a signal unblock followed by a kill(self, SIGABRT). > > > > > 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." > > > > it also says > > "The abort() function shall cause abnormal process termination > to occur, unless the signal SIGABRT is being caught and the > signal handler does not return." > > and > > "The abort() function shall not return." > > (in c11 abort is _Noreturn and returning from such a function > is undefined behaviour). Hmm.. What happens if a hander is installed, but that never returns ? (but also doesn't terminate the process). If I read the manpage correct, it says it's OK, but also says it isn't. Igmar