Пример #1
0
int acl_proctl_deamon_start_one(const char *progchild, int argc, char *argv[])
{
	const char *myname = "acl_proctl_deamon_start_one";
	PROCTL_SERVICE *service;

	if (proctl_service_exist(progchild)) {
		acl_msg_error("%s(%d): child(%s) maybe be running!",
			myname, __LINE__, progchild);
		return (-1);
	}

	service = proctl_service_new(progchild, argc, argv);
	if (proctl_service_start(service) < 0) {
		proctl_service_free(service);
		return (-1);
	}

	return (0);
}
Пример #2
0
static void proctl_service_stopped(PROCTL_SERVICE *service)
{
	handles_del(service->hProcess);
	proctl_service_free(service);
}