initdb: Use atexit()

Peter Eisentraut <peter@eisentraut.org>

Commit: 3913a40ff104fd26f795c3d4c402ec27a1f86385
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2019-01-07T15:24:50Z
Releases: 12.0
initdb: Use atexit()

Replace exit_nicely() calls with standard exit() and register the
cleanup actions using atexit().  The coding pattern used here mirrors
existing use in pg_basebackup.c.

Reviewed-by: Alvaro Herrera <alvherre@2ndquadrant.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/flat/ec4135ba-84e9-28bf-b584-0e78d47448d5@2ndquadrant.com/

Files

PathChange+/−
src/bin/initdb/initdb.c modified +43 −39

Discussion

Cited messages not in the archive: ec4135ba-84e9-28bf-b584-0e78d47448d5@2ndquadrant.com/