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

Function trigger_server_init

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

Source from the content-addressed store, hash-verified

340#endif
341
342static void trigger_server_init(const char *procname)
343{
344 const char *myname = "trigger_server_init";
345 static int inited = 0;
346
347 if (inited)
348 return;
349
350 inited = 1;
351
352 if (procname == NULL || *procname == 0)
353 acl_msg_fatal("%s(%d); procname null", myname, __LINE__);
354
355 /*
356 * Don't die when a process goes away unexpectedly.
357 */
358 signal(SIGPIPE, SIG_IGN);
359
360 /*
361 * Don't die for frivolous reasons.
362 */
363#ifdef SIGXFSZ
364 signal(SIGXFSZ, SIG_IGN);
365#endif
366
367 /*
368 * May need this every now and then.
369 */
370
371 acl_var_trigger_pid = getpid();
372 acl_var_trigger_procname = acl_mystrdup(acl_safe_basename(procname));
373
374 acl_var_trigger_log_file = getenv("SERVICE_LOG");
375 if (acl_var_trigger_log_file == NULL) {
376 acl_var_trigger_log_file = acl_mystrdup("acl_master.log");
377 acl_msg_fatal("%s(%d)->%s: can't get MASTER_LOG's env value,"
378 " use %s log", __FILE__, __LINE__, myname,
379 acl_var_trigger_log_file);
380 }
381
382 acl_get_app_conf_int_table(__conf_int_tab);
383 acl_get_app_conf_int64_table(__conf_int64_tab);
384 acl_get_app_conf_str_table(__conf_str_tab);
385}
386
387static void trigger_server_open_log(void)
388{

Callers 1

acl_trigger_server_mainFunction · 0.85

Calls 5

acl_msg_fatalFunction · 0.85
acl_safe_basenameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…