|
Message-ID: <alpine.LRH.2.20.1607041526500.30017@s1.palsenberg.com> Date: Mon, 4 Jul 2016 15:30:23 +0200 (CEST) From: Igmar Palsenberg <igmar@...senberg.com> To: musl@...ts.openwall.com cc: Jorge Almeida <jjalmeida@...il.com> Subject: Re: abort() PID 1 > > - 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.