Merge pull request #12055 from poettering/save-argc-argv

main-func.h and systemctl argc/argv improvements
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-03-22 16:58:18 +01:00
committed by GitHub
6 changed files with 35 additions and 25 deletions
+4 -2
View File
@@ -8,17 +8,19 @@
#include "spawn-ask-password-agent.h"
#include "spawn-polkit-agent.h"
#include "static-destruct.h"
#include "util.h"
#define _DEFINE_MAIN_FUNCTION(intro, impl, ret) \
int main(int argc, char *argv[]) { \
int r; \
save_argc_argv(argc, argv); \
intro; \
r = impl; \
static_destruct(); \
ask_password_agent_close(); \
polkit_agent_close(); \
mac_selinux_finish(); \
pager_close(); \
mac_selinux_finish(); \
static_destruct(); \
return ret; \
}