basic/main-func: also close the pager automatically

We generally want to close the pager last. This patch closes the pager last,
after the static destuctor calls. This means that they can do logging and such
like during normal program runtime.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-11-20 16:48:21 +01:00
parent ec5e594831
commit a34c79d006
3 changed files with 12 additions and 20 deletions
+2
View File
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include "pager.h"
#include "static-destruct.h"
#define _DEFINE_MAIN_FUNCTION(impl, ret) \
@@ -10,6 +11,7 @@
int r; \
r = impl(argc, argv); \
static_destruct(); \
pager_close(); \
return ret; \
}