sprintf(app_instance, "%s_%ld", daemon_name, (long)getpid());
sprintf(app_instance, "%s_%ld", crm_system_name, (long)getpid());
register_with_apphb(void){    // Register with apphb    cl_log(LOG_INFO, "Signing in with AppHb");    char	app_instance[APPNAME_LEN];    int     hb_intvl_ms = wdt_interval_ms * 2;    int     rc = 0;    sprintf(app_instance, "%s_%ld", daemon_name, (long)getpid());      cl_log(LOG_INFO, "Client %s registering with apphb", app_instance);    rc = apphb_register(daemon_name, app_instance);        if (rc < 0) {	cl_perror("%s registration failure", app_instance);	exit(1);    }      cl_log(LOG_DEBUG, "Client %s registered with apphb", app_instance);      cl_log(LOG_INFO, 	   "Client %s setting %d ms apphb heartbeat interval"	   , app_instance, hb_intvl_ms);    rc = apphb_setinterval(hb_intvl_ms);    if (rc < 0) {	cl_perror("%s setinterval failure", app_instance);	exit(2);    }      // regularly tell apphb that we are alive    cl_log(LOG_INFO, "Setting up AppHb Heartbeat");    Gmain_timeout_add(wdt_interval_ms, tickle_apphb, NULL);}