int main(int argc, const char **argv) { const char *socket_path; static const char *usage[] = { "git-credential-cache--daemon [opts] <socket_path>", NULL }; int debug = 0; const struct option options[] = { OPT_BOOL(0, "debug", &debug, N_("print debugging messages to stderr")), OPT_END() }; argc = parse_options(argc, argv, NULL, options, usage, 0); socket_path = argv[0]; if (!socket_path) usage_with_options(usage, options); check_socket_directory(socket_path); register_tempfile(&socket_file, socket_path); serve_cache(socket_path, debug); delete_tempfile(&socket_file); return 0; }
int main(int argc, const char **argv) { socket_path = argv[1]; if (!socket_path) die("usage: git-credential-cache--daemon <socket_path>"); check_socket_directory(socket_path); atexit(cleanup_socket); sigchain_push_common(cleanup_socket_on_signal); serve_cache(socket_path); return 0; }