コード例 #1
0
ファイル: authd.c プロジェクト: KeiroD/charybdis
int
main(int argc, char *argv[])
{
	setup_signals();

	authd_helper = rb_helper_child(parse_request, error_cb, NULL, NULL, NULL, 256, 256, 256);	/* XXX fix me */
	if(authd_helper == NULL)
	{
		fprintf(stderr, "authd is not meant to be invoked by end users\n");
		exit(EX_ERROR);
	}

	rb_set_time();
	setup_signals();

	authd_option_handlers = rb_dictionary_create("authd options handlers", rb_strcasecmp);

	init_resolver();
	init_providers();
	rb_init_prng(NULL, RB_PRNG_DEFAULT);

	rb_helper_loop(authd_helper, 0);

	/*
	 * XXX this function will never be called from here -- is it necessary?
	 */
	destroy_providers();

	return 0;
}
コード例 #2
0
ファイル: resolver.c プロジェクト: ratbox-mirrors/ircd-ratbox
int
main(int argc, char **argv)
{
	res_helper = rb_helper_child(parse_request, error_cb, NULL, NULL, NULL, 256);	/* XXX fix me */

	if(res_helper == NULL)
	{
		fprintf(stderr,
			"This is ircd-ratbox resolver.	You know you aren't supposed to run me directly?\n");
		fprintf(stderr,
			"You get an Id tag for this: $Id$\n");
		fprintf(stderr, "Bleep blorp.\n");
		exit(1);
	}
	rb_set_time();
	setup_signals();
	init_resolver();
	rb_init_prng(NULL, RB_PRNG_DEFAULT);
	rb_event_add("check_rehash", check_rehash, NULL, 5);
	report_nameservers();
	rb_helper_loop(res_helper, 0);
}