mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove support for on_exit()
All supported platforms support the C89 standard function atexit() (SunOS 4 probably being the last one not to), and supporting both makes the code clumsy.
This commit is contained in:
@ -130,11 +130,7 @@ get_major_server_version(ClusterInfo *cluster)
|
||||
|
||||
|
||||
static void
|
||||
#ifdef HAVE_ATEXIT
|
||||
stop_postmaster_atexit(void)
|
||||
#else
|
||||
stop_postmaster_on_exit(int exitstatus, void *arg)
|
||||
#endif
|
||||
{
|
||||
stop_postmaster(true);
|
||||
|
||||
@ -151,11 +147,7 @@ start_postmaster(ClusterInfo *cluster)
|
||||
|
||||
if (!exit_hook_registered)
|
||||
{
|
||||
#ifdef HAVE_ATEXIT
|
||||
atexit(stop_postmaster_atexit);
|
||||
#else
|
||||
on_exit(stop_postmaster_on_exit);
|
||||
#endif
|
||||
exit_hook_registered = true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user