mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 00:53:02 -05:00
On Windows std::_Exit ends in ExitProcess, which still runs every module's DLL_PROCESS_DETACH and TLS callbacks after the other threads are gone. A static destructor that joins a worker then waits forever: a title that calls _Exit while libSceVideoOut's flip queue runs (ps5-opengl's retirement fail-stop) stays alive in FlipQueue's destructor. _Exit and libkernel's _exit now terminate the process with TerminateProcess, as _exit ends a POSIX process: no atexit handlers, stream flushes or module destructors.
18 lines
631 B
C++
18 lines
631 B
C++
#ifndef CORE_LIBS_PRX_LIBC_INCLUDE_SHUTDOWN_HPP
|
|
#define CORE_LIBS_PRX_LIBC_INCLUDE_SHUTDOWN_HPP
|
|
|
|
#include <stop_token>
|
|
|
|
class ProcessShutdown final {};
|
|
|
|
extern "C" void LibcRegisterShutdown_nid_postfix(void (*callback)());
|
|
extern "C" void LibcRunShutdown_nid_postfix();
|
|
extern "C" std::stop_token LibcShutdownToken_nid_postfix();
|
|
extern "C" void LibcRequestShutdown_nid_postfix();
|
|
extern "C" void LibcRequestExit_nid_postfix(int code);
|
|
extern "C" [[noreturn]] void LibcAwaitExit_nid_postfix();
|
|
extern "C" [[noreturn]] void LibcExit_nid_no_patch(int code);
|
|
extern "C" [[noreturn]] void LibcTerminate_nid_no_patch(int code);
|
|
|
|
#endif
|