MCPcopy Create free account
hub / github.com/acl-dev/acl / acl_trigger_server_main

Function acl_trigger_server_main

lib_acl/src/master/template/acl_trigger_server.c:421–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419/* trigger_server_main - the real main program */
420
421void acl_trigger_server_main(int argc, char **argv, ACL_TRIGGER_SERVER_FN service,...)
422{
423 const char *myname = "trigger_server_main";
424 ACL_MASTER_SERVER_INIT_FN pre_init = 0;
425 ACL_MASTER_SERVER_INIT_FN post_init = 0;
426 ACL_MASTER_SERVER_LOOP_FN loop = 0;
427 char *service_name = acl_mystrdup(acl_safe_basename(argv[0]));
428 int c, socket_count = 1, key, fd, fdtype = 0;
429 char *lock_path;
430 const char *root_dir = 0, *user_name = 0;
431 const char *transport = 0;
432 ACL_VSTREAM *stream;
433 ACL_VSTRING *why, *buf = acl_vstring_alloc(128);
434 ACL_WATCHDOG *watchdog;
435 char *generation;
436
437 va_list ap;
438
439 /* ��ǰ����ģ���ʼ������ʹ��־����ش�, ��ʼ��ʹ�� acl_master ����־�ļ� */
440 master_log_open(argv[0]);
441
442 /*
443 * Pick up policy settings from master process. Shut up error messages to
444 * stderr, because no-one is going to see them.
445 */
446#ifdef ACL_LINUX
447 opterr = 0;
448 optind = 0;
449 optarg = 0;
450#endif
451
452 __conf_file[0] = 0;
453
454 while ((c = getopt(argc, argv, "HcDl:n:s:t:uf:")) > 0) {
455 switch (c) {
456 case 'H':
457 usage(argc, argv);
458 exit (0);
459 case 'f':
460 acl_app_conf_load(optarg);
461 snprintf(__conf_file, sizeof(__conf_file), "%s", optarg);
462 break;
463 case 'c':
464 root_dir = "setme";
465 break;
466 case 'n':
467 service_name = optarg;
468 break;
469 case 's':
470 if ((socket_count = atoi(optarg)) > 0)
471 break;
472 acl_msg_fatal("invalid socket_count: %s", optarg);
473 /* NOT REACHED */
474 break;
475 case 't':
476 transport = optarg;
477 break;
478 case 'u':

Callers 2

mainFunction · 0.85
run_daemonMethod · 0.85

Calls 15

acl_safe_basenameFunction · 0.85
acl_vstring_allocFunction · 0.85
master_log_openFunction · 0.85
acl_app_conf_loadFunction · 0.85
acl_msg_fatalFunction · 0.85
trigger_server_initFunction · 0.85
acl_msg_infoFunction · 0.85
acl_msg_panicFunction · 0.85
acl_alldigFunction · 0.85
acl_concatenateFunction · 0.85
acl_safe_openFunction · 0.85
acl_close_on_execFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…