1
0
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:
Peter Eisentraut
2011-12-27 20:57:59 +02:00
parent c317a3ac16
commit d383c23f6f
7 changed files with 2 additions and 268 deletions

View File

@ -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;
}