From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason at zx2c4.com (Jason A. Donenfeld) Date: Tue, 23 Feb 2016 16:00:59 +0100 Subject: why no process info when cloning In-Reply-To: <20160223144245.GM1766@serenity.lan> References: <20160223094505.GF1766@serenity.lan> <20160223144245.GM1766@serenity.lan> Message-ID: I would, instead, suggest this elegant hack: zx2c4 at thinkpad ~ $ cat a.c int main(int argc, char *argv[]) { printf("git's main\n"); } zx2c4 at thinkpad ~ $ cat b.c #define main git_http_backend_main #include "a.c" #undef main int main(int argc, char *argv[]) { printf("cgit's main\n"); git_http_backend_main(argc, argv); } zx2c4 at thinkpad ~ $ ./a.out cgit's main git's main This way, in fact, we don't even need to use the main function, if it turns out we could benefit from accessing various static functions.