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:
@@ -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; \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user