mirror of
https://github.com/git/git.git
synced 2024-11-18 23:03:56 +01:00
de61cebde7
* jk/common-main-2.8: mingw: declare main()'s argv as const common-main: call git_setup_gettext() common-main: call restore_sigpipe_to_default() common-main: call sanitize_stdfds() common-main: call git_extract_argv0_path() add an extra level of indirection to main()
23 lines
354 B
C
23 lines
354 B
C
#include "cache.h"
|
|
#include "sigchain.h"
|
|
|
|
#define X(f) \
|
|
static void f(int sig) { \
|
|
puts(#f); \
|
|
fflush(stdout); \
|
|
sigchain_pop(sig); \
|
|
raise(sig); \
|
|
}
|
|
X(one)
|
|
X(two)
|
|
X(three)
|
|
#undef X
|
|
|
|
int cmd_main(int argc, const char **argv) {
|
|
sigchain_push(SIGTERM, one);
|
|
sigchain_push(SIGTERM, two);
|
|
sigchain_push(SIGTERM, three);
|
|
raise(SIGTERM);
|
|
return 0;
|
|
}
|