|
Message-ID: <CAKpSnpJvJAktWS+i+ncEuU5i3apeYCqTPtjUfMn4gkyc3mwvdg@mail.gmail.com> Date: Mon, 4 Jul 2016 01:09:32 -0700 From: Jorge Almeida <jjalmeida@...il.com> To: musl@...ts.openwall.com Subject: abort() PID 1 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
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.