lua-users home
lua-l archive

Re: <close> and os.exit()

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Sat, May 30, 2020 at 2:44 PM Phil Leblanc <philanc@gmail.com> wrote:
Granted! :-)    although abort() implementation --at least on Linux--
calls _exit()  ;-)

An awful lot has to go wrong before abort() calls _exit(127). Abort tries the following on my PC (Debian 10):
  • unmask signal SIGABRT and send SIGABRT signal to itself
  • reset the signal handler for SIGABRT to the default
  • send SIGABRT signal to itself
  • execute the "hlt" (halt) instruction to crash the program ("hlt" is privileged)
  • call _exit(127)
  • go into infinite loop executing the "hlt" instruction
In normal circumstances the program dies as a result of SIGABRT.


--


AltStyle によって変換されたページ (->オリジナル) /