static int upload_pack(void) { struct child_process cld = CHILD_PROCESS_INIT; argv_array_pushl(&cld.args, "upload-pack", "--strict", NULL); argv_array_pushf(&cld.args, "--timeout=%u", timeout); return run_service_command(&cld); }
static int upload_pack(void) { /* Timeout as string */ char timeout_buf[64]; const char *argv[] = { "upload-pack", "--strict", timeout_buf, ".", NULL }; snprintf(timeout_buf, sizeof timeout_buf, "--timeout=%u", timeout); return run_service_command(argv); }
int ACE_TMAIN(int argc, ACE_TCHAR *argv[]) { Activator_Options opts; int result = opts.init (argc, argv); if (result < 0) return 1; // Error else if (result > 0) return 0; // No error, but we should exit anyway. result = run_service_command (opts); if (result < 0) return 1; // Error else if (result > 0) return 0; // No error, but we should exit anyway. if (opts.service ()) return run_service (); return run_standalone (opts); }
static int receive_pack(void) { static const char *argv[] = { "receive-pack", ".", NULL }; return run_service_command(argv); }
static int upload_archive(void) { static const char *argv[] = { "upload-archive", ".", NULL }; return run_service_command(argv); }
static int receive_pack(void) { struct child_process cld = CHILD_PROCESS_INIT; argv_array_push(&cld.args, "receive-pack"); return run_service_command(&cld); }
static int upload_archive(void) { struct child_process cld = CHILD_PROCESS_INIT; argv_array_push(&cld.args, "upload-archive"); return run_service_command(&cld); }