当前位置: 首页>>代码示例>>C++>>正文


C++ signals_init函数代码示例

本文整理汇总了C++中signals_init函数的典型用法代码示例。如果您正苦于以下问题:C++ signals_init函数的具体用法?C++ signals_init怎么用?C++ signals_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了signals_init函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: init_main

int init_main(void)
{
#ifdef __IBMC__
       signals_init(0);
#else
       signals_init(debug.do_core_dumps);
#endif

    romset_init();

    if (!video_disabled_mode) {
        palette_init();
    }

    if (machine_class != VICE_MACHINE_VSID) {
        screenshot_init();

        drive_cpu_early_init_all();
    }

    machine_bus_init();
    machine_maincpu_init();

    /* Machine-specific initialization.  */
    if (machine_init() < 0) {
        log_error(LOG_DEFAULT, "Machine initialization failed.");
        return -1;
    }

    /* FIXME: what's about uimon_init??? */
    /* the monitor console MUST be available, because of for example cpujam,
       or -initbreak from cmdline.
    */
    if (console_init() < 0) {
        log_error(LOG_DEFAULT, "Console initialization failed.");
        return -1;
    }

    keyboard_init();

    if (machine_class != VICE_MACHINE_VSID) {
        vdrive_init();
    }

    ui_init_finalize();

    return 0;
}
开发者ID:OpenEmu,项目名称:VICE-Core,代码行数:48,代码来源:init.c

示例2: core_init

void core_init(void)
{
	modules_init();
#ifndef WIN32
	pidwait_init();
#endif

	net_disconnect_init();
	net_sendbuffer_init();
	signals_init();
	settings_init();
	commands_init();
        nickmatch_cache_init();

	chat_protocols_init();
	chatnets_init();
        expandos_init();
	ignore_init();
	servers_init();
        write_buffer_init();
	log_init();
	rawlog_init();

	channels_init();
	queries_init();
	nicklist_init();

	chat_commands_init();
        settings_check();
}
开发者ID:svn2github,项目名称:irssi,代码行数:30,代码来源:core.c

示例3: main

int main(int argc, char *argv[])
{
    me.ev = mowgli_eventloop_create();

    signals_init();

    parse_commandline_options(argc, argv);

    me.config = mowgli_config_file_load(config_file);

    if(me.config == NULL)
        sigyn_fatal("Cannot load configuration file.");
    logger_init(me.config->entries);
    config_check(me.config);

    me.uplink.line = new_conn(me.uplink.hostname, me.uplink.port, me.uplink.ssl, read_irc, NULL);
    if (me.uplink.line == NULL)
        sigyn_fatal("Connection to uplink failed.");
    me.uplink.connected = true;

    loadmodules(me.config->entries);

    sigyn_introduce_client(me.client->nick, me.client->user, NULL);
    if (should_fork)
        daemonise(SYSCONFDIR "/sigyn.pid");
    mowgli_eventloop_run(me.ev);

    sigyn_cleanup();
    return EXIT_SUCCESS;
}
开发者ID:alyx,项目名称:sigyn,代码行数:30,代码来源:sigyn.c

示例4: main

int main(int ac, char **av, char **ev)
{
	struct stat tmp;
	char *file;
	pid_t pid;

	if (ac < 2)
		print_help();
	if (!(file = get_file_path(av[1], ev)))
	{
		ft_putendl_fd("Can't find exec in path", 2);
		exit(EXIT_SUCCESS);
	}
	if (stat(file, &tmp) == -1)
	{
		ft_putstr_fd("ft_strace: \"", 2);
		ft_putstr_fd(av[1], 2);
		ft_putstr_fd("\": No such file or directory", 2);
		exit(EXIT_FAILURE);
	}
	syscalls_init();
	signals_init();
	errno_init();
	pid = fork();
	if (pid == -1)
	{
		ft_putendl_fd("ft_strace: failed to fork", 2);
		exit(EXIT_FAILURE);
	}
	else if (pid == 0)
		child_launch(av, file);
	else
		parent_launch(pid);
	return (EXIT_SUCCESS);
}
开发者ID:acazuc,项目名称:42_ft_strace,代码行数:35,代码来源:main.c

示例5: main

/*======================================
 *	CORE : MAINROUTINE
 *--------------------------------------*/
int main (int argc, char **argv)
{
	{// initialize program arguments
		char *p1 = SERVER_NAME = argv[0];
		char *p2 = p1;
		while ((p1 = strchr(p2, '/')) != NULL || (p1 = strchr(p2, '\\')) != NULL)
		{
			SERVER_NAME = ++p1;
			p2 = p1;
		}
		arg_c = argc;
		arg_v = argv;
	}

	malloc_init();// needed for Show* in display_title() [FlavioJS]

#ifdef MINICORE // minimalist Core
	display_title();
	usercheck();
	do_init(argc,argv);
	do_final();
#else// not MINICORE
	set_server_type();
	display_title();
	usercheck();

	db_init();
	signals_init();

	timer_init();
	socket_init();
	plugins_init();

	do_init(argc,argv);
	plugin_event_trigger(EVENT_ATHENA_INIT);

	{// Main runtime cycle
		int next;
		while (runflag != CORE_ST_STOP) {
			next = do_timer(gettick_nocache());
			do_sockets(next);
		}
	}

	plugin_event_trigger(EVENT_ATHENA_FINAL);
	do_final();

	timer_final();
	plugins_final();
	socket_final();
	db_final();
#endif

	malloc_final();

	return 0;
}
开发者ID:philg666,项目名称:Latest_eAmod,代码行数:60,代码来源:core.c

示例6: core_init

void core_init(void)
{
	dialog_type_queue = NULL;
	dialog_text_queue = NULL;
	client_start_time = time(NULL);

	modules_init();
	pidwait_init();

	net_disconnect_init();
	signals_init();

	signal_add_first("gui dialog", (SIGNAL_FUNC) sig_gui_dialog);
	signal_add_first("irssi init finished", (SIGNAL_FUNC) sig_init_finished);

	settings_init();
	commands_init();
	nickmatch_cache_init();
        session_init();
#ifdef HAVE_CAPSICUM
	capsicum_init();
#endif

	chat_protocols_init();
	chatnets_init();
        expandos_init();
	ignore_init();
	servers_init();
        write_buffer_init();
	log_init();
	log_away_init();
	rawlog_init();
	recode_init();

	channels_init();
	queries_init();
	nicklist_init();

	chat_commands_init();
	wcwidth_wrapper_init();

	settings_add_str("misc", "ignore_signals", "");
	settings_add_bool("misc", "override_coredump_limit", FALSE);

#ifdef HAVE_SYS_RESOURCE_H
	getrlimit(RLIMIT_CORE, &orig_core_rlimit);
#endif
	read_settings();
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);
	signal_add("irssi init finished", (SIGNAL_FUNC) sig_irssi_init_finished);

	settings_check();

        module_register("core", "core");
}
开发者ID:ailin-nemui,项目名称:irssi,代码行数:55,代码来源:core.c

示例7: main

/*======================================
 *	CORE : MAINROUTINE
 *--------------------------------------*/
int main (int argc, char **argv)
{
	{
		// Inicializa os argumentos do programa
		char *p1 = SERVER_NAME = argv[0];
		char *p2 = p1;

		while ( (p1 = strchr (p2, '/')) != NULL || (p1 = strchr (p2, '\\')) != NULL)
		{
			SERVER_NAME = ++p1;
			p2 = p1;
		}

		arg_c = argc;
		arg_v = argv;
	}
	malloc_init(); // needed for Show* in display_title() [FlavioJS]
#ifndef _WIN32
	usercheck();
#endif
#ifdef MINICORE // minimalist Core
	display_title();
	do_init (argc, argv);
	do_final();
#else// not MINICORE
	set_server_type();	// Define o tipo de servidor (função exclusiva de cada servidor)
	display_title();	// Mostra o título
	db_init();
	signals_init();
#ifdef _WIN32
	cevents_init();
#endif
	timer_init();
	socket_init();
	do_init (argc, argv);	// Inicializa as funções do servidor
	{
		// Ciclo principal do servidor
		int next;

		// Enquanto a runflag não for a de Parar, o servidor rodará; do contrário, entrará em processo de finalização
		while (runflag != CORE_ST_STOP)
		{
			next = do_timer (gettick_nocache());
			do_sockets (next);
		}
	}
	do_final();
	timer_final();
	socket_final();
	db_final();
#endif
	malloc_final();
	return 0;
}
开发者ID:Zellukas,项目名称:Radices,代码行数:57,代码来源:core.c

示例8: core_init

void core_init(int argc, char *argv[])
{
	dialog_type_queue = NULL;
	dialog_text_queue = NULL;

	modules_init();
#ifndef WIN32
	pidwait_init();
#endif

	net_disconnect_init();
	net_sendbuffer_init();
	signals_init();

	signal_add_first("gui dialog", (SIGNAL_FUNC) sig_gui_dialog);
	signal_add_first("irssi init finished", (SIGNAL_FUNC) sig_init_finished);

	settings_init();
	commands_init();
	nickmatch_cache_init();
        session_init();

	chat_protocols_init();
	chatnets_init();
        expandos_init();
	ignore_init();
	servers_init();
        write_buffer_init();
	log_init();
	log_away_init();
	rawlog_init();
	recode_init();

	channels_init();
	queries_init();
	nicklist_init();

	chat_commands_init();

	settings_add_str("misc", "ignore_signals", "");
	settings_add_bool("misc", "override_coredump_limit", TRUE);

#ifdef HAVE_SYS_RESOURCE_H
	getrlimit(RLIMIT_CORE, &orig_core_rlimit);
#endif
	read_settings();
	signal_add("setup changed", (SIGNAL_FUNC) read_settings);
	signal_add("irssi init finished", (SIGNAL_FUNC) sig_irssi_init_finished);

	settings_check();

        module_register("core", "core");
}
开发者ID:svn2github,项目名称:irssi,代码行数:53,代码来源:core.c

示例9: main

int main (int argc, char **argv)
{
	int next;

	// initialise program arguments
	{
		char *p = SERVER_NAME = argv[0];
		while ((p = strchr(p, '/')) != NULL)
			SERVER_NAME = ++p;
		arg_c = argc;
		arg_v = argv;
	}

	set_server_type();
	display_title();
      usercheck();

	malloc_init(); /* 一番最初に実行する必要がある */
	db_init();
	signals_init();

	timer_init();
	socket_init();
	plugins_init();

	do_init(argc,argv);
	graph_init();
	plugin_event_trigger("Athena_Init");

	while (runflag) {
		next = do_timer(gettick_nocache());
		do_sendrecv(next);
#ifndef TURBO
		do_parsepacket();
#endif
	}

	plugin_event_trigger("Athena_Final");
	graph_final();
	do_final();

	timer_final();
	plugins_final();
	socket_final();
	db_final();
	malloc_final();

	return 0;
}
开发者ID:AxlSckay,项目名称:Ragnarok-OldTimes,代码行数:49,代码来源:core.c

示例10: core_init

void core_init(void)
{
	modules_init();
	pidwait_init();

	net_disconnect_init();
	signals_init();
	settings_init();
	commands_init();

	servers_init();
	log_init();
	rawlog_init();
	special_vars_init();
}
开发者ID:svn2github,项目名称:irssi,代码行数:15,代码来源:core.c

示例11: main

int main (int argc, char **argv)
{
	{// initialize program arguments
		char *p1 = SERVER_NAME = argv[0];
		char *p2 = p1;
		while ((p1 = strchr(p2, '/')) != NULL || (p1 = strchr(p2, '\\')) != NULL)
		{
			SERVER_NAME = ++p1;
			p2 = p1;
		}
		arg_c = argc;
		arg_v = argv;
	}

	malloc_init();
	set_server_type();
	display_title();
	usercheck();
	signals_init();
	timer_init();
	socket_init();

	do_init(argc,argv);

	{// Main runtime cycle
		int next;

		while (runflag) 
		{
			next = CTaskMgr::getInstance()->DoTimer(gettick_nocache());
			do_sockets(next);
		}
	}

	do_final();
	timer_final();
	socket_final();
	malloc_final();
	return 0;
}
开发者ID:fedaykinofdune,项目名称:ffxinfinity,代码行数:40,代码来源:kernel.cpp

示例12: main

int main (int argc, char **argv)
{
	{// initialize program arguments
		char *p1 = SERVER_NAME = argv[0];
		char *p2 = p1;
		while ((p1 = strchr(p2, '/')) != NULL || (p1 = strchr(p2, '\\')) != NULL)
		{
			SERVER_NAME = ++p1;
			p2 = p1;
		}
		arg_c = argc;
		arg_v = argv;
	}

    log_init(argc, argv);
	malloc_init();
	set_server_type();
	display_title();
	usercheck();
	signals_init();
	timer_init();
	socket_init();

	do_init(argc,argv);
	fd_set rfd;
	{// Main runtime cycle
		duration next;

		while (runflag) 
		{
            next = CTaskMgr::getInstance()->DoTimer(server_clock::now());
			do_sockets(&rfd,next);
		}
	}

    do_final(EXIT_SUCCESS);
	return 0;
}
开发者ID:LegionXI,项目名称:darkstar,代码行数:38,代码来源:kernel.cpp

示例13: main

int
main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
	g_thread_init(NULL);
	signals_init();
	io_thread_init();

	struct ntp_server ntp;
	ntp_server_init(&ntp);

	GError *error = NULL;
	if (!ntp_server_open(&ntp, &error)) {
		io_thread_deinit();
		g_printerr("%s\n", error->message);
		g_error_free(error);
		return EXIT_FAILURE;
	}

	io_thread_run();

	ntp_server_close(&ntp);
	io_thread_deinit();
	return EXIT_SUCCESS;
}
开发者ID:degifted,项目名称:MPD-with-support-for-FLAC-CUE-and--CUE-files-as-virtual-directories,代码行数:24,代码来源:run_ntp_server.c

示例14: main

int main(int argc, char **argv)
{
	int c, port = 2222, samplefreq = SAMPLEFREQ, chans = 2;
	int fmt_bits = 16;
	char *dev = "/dev/dsp";
	
	while((c = getopt(argc, argv, "+b:B:c:dhp:s:D:")) != EOF) {
		switch(c) {
			case 'b':
				buffer_size = atoi(optarg) * 1024;
				if(buffer_size < 16) {
					fprintf(stderr, "ERROR: buffer_size < 16\n");
					exit(1);
				}
				break;
			case 'c':
				chans = atoi(optarg);
				break;
			case 'd':
				debug++;
				break;
			case 'B':
				fmt_bits = atoi(optarg);
				if(fmt_bits != 16 && fmt_bits != 32) usage(1);
				break;
			case 'h':
				usage(0);
			case 'p':
				port = atoi(optarg);
				break;
			case 's':
				samplefreq = atoi(optarg);
				break;
			case 'D':
				dev = optarg;
				break;
			default:
				usage(1);
		}
	}

	buffer_init();
	input_start();
	output_init(dev, samplefreq, fmt_bits, chans);
	signals_init();
	socket_init(port);

	/* lock memory (limits for non-root can be raised in /etc/security/limits.conf) */
	if(mlockall(MCL_CURRENT | MCL_FUTURE) == -1) {
		struct rlimit rl;
		if(getrlimit(RLIMIT_MEMLOCK, &rl) == 0) {
			rl.rlim_cur = rl.rlim_max;
			if(setrlimit(RLIMIT_MEMLOCK, &rl) == -1) {
				perror("setrlimit RLIMIT_MEMLOCK");
			}
		}
		if(mlockall(MCL_CURRENT | MCL_FUTURE) == -1) {
			perror("warning: mlockall");
		}
	}

	/* realtime priority (limits for non-root can be raised in /etc/security/limits.conf) */
	struct sched_param sp;
	sp.sched_priority = 1;
	if(sched_setscheduler(getpid(), SCHED_FIFO, &sp) < 0)
		perror("sched_setscheduler");

	output_start();
	mainloop();

	return 0;
}
开发者ID:eric321,项目名称:soepkiptng,代码行数:72,代码来源:soepkiptng_play.c

示例15: main

/*======================================
 *	CORE : MAINROUTINE
 *--------------------------------------*/
int main (int argc, char **argv)
{
	{// Inicializa os argumentos do programa
		char *p1 = SERVER_NAME = argv[0];
		char *p2 = p1;
		while ((p1 = strchr(p2, '/')) != NULL || (p1 = strchr(p2, '\\')) != NULL)
		{
			SERVER_NAME = ++p1;
			p2 = p1;
		}
		arg_c = argc;
		arg_v = argv;
	}

// Não precisamos chamar o malloc_init se o Memory Manager não está ativo [Keoy]
#ifdef USE_MEMMGR
	malloc_init(); // needed for Show* in display_title() [FlavioJS]
#endif

#ifdef MINICORE // minimalist Core
	display_title();
	#ifndef _WIN32
		usercheck();
	#endif
	do_init(argc,argv);
	do_final();
#else// not MINICORE
	set_server_type();	// Define o tipo de servidor (função exclusiva de cada servidor)
	display_title();	// Mostra o título
	// Não precisamos verificar se estamos em root se não estamos em um sistema WIN32 [Keoy]
	#ifndef _WIN32
		usercheck();
	#endif
	db_init();
	signals_init();

	timer_init();
	socket_init();
	plugins_init();

	do_init(argc,argv);	// Inicializa as funções do servidor
	plugin_event_trigger(EVENT_ATHENA_INIT); // Evento inicial dos plugins

	{// Ciclo principal do servidor
		int next;
		// Enquanto a runflag for verdadeira (1) o servidor rodará, do contrário entrará em processo de finalização
		while (runflag) {
			next = do_timer(gettick_nocache());
			do_sockets(next);
		}
	}

	plugin_event_trigger(EVENT_ATHENA_FINAL); // Evento final dos plugins
	do_final();

	timer_final();
	plugins_final();
	socket_final();
	db_final();
#endif

// Não precisamos chamar o malloc_init se o Memory Manager não está ativo [Keoy]
#ifdef USE_MEMMGR
	malloc_final();
#endif

	return 0;
}
开发者ID:holdur,项目名称:oraculo,代码行数:71,代码来源:core.c


注:本文中的signals_init函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。