#define ASL_KEY_FREE_NOTE "ASLFreeNotify"
#define ASL_KEY_MESSAGETRACER "com.apple.message.domain"
#define ASL_KEY_POWERMANAGEMENT "com.apple.iokit.domain"
-#define ASL_KEY_LASTLOG "com.apple.system.lastlog"
#define ASL_KEY_CFLOG_LOCAL_TIME "CFLog Local Time"
+#define FACILITY_LASTLOG "com.apple.system.lastlog"
+#define FACILITY_UTMPX "com.apple.system.utmpx"
+
/* remote control bits */
#define EVAL_LEVEL_MASK 0x000000ff
#define EVAL_ACTION_MASK 0xffff0000
/* don't send lastlog/utmp messages to Activity Tracing */
val = NULL;
- if ((asl_msg_lookup(msg, ASL_KEY_FACILITY, &val, NULL) == 0) && (val != NULL) && (!strcmp(val, ASL_KEY_LASTLOG))) eval &= ~EVAL_SEND_TRACE;
+ if ((asl_msg_lookup(msg, ASL_KEY_FACILITY, &val, NULL) == 0) && (val != NULL) &&
+ (!strcmp(val, FACILITY_LASTLOG) || !strcmp(val, FACILITY_UTMPX))) eval &= ~EVAL_SEND_TRACE;
/* don't send CFLog messages to Activity Tracing */
val = NULL;
char aux_val[64];
asl_msg_t *aux;
int status;
- unsigned int osacount = 1;
- os_activity_t osaid = 0;
+ os_activity_id_t osaid;
aux = asl_msg_new(ASL_TYPE_MSG);
if (aux == NULL) return NULL;
asl_msg_set_key_val(aux, ASL_KEY_PID, aux_val);
/* OSActivityID */
- if (os_activity_get_active(&osaid, &osacount) == 1)
+ osaid = os_activity_get_identifier(OS_ACTIVITY_CURRENT, NULL);
+ if (osaid)
{
- snprintf(aux_val, sizeof(aux_val), "0x%016llx", (uint64_t)osaid);
+ snprintf(aux_val, sizeof(aux_val), "0x%016llx", osaid);
asl_msg_set_key_val(aux, ASL_KEY_OS_ACTIVITY_ID, aux_val);
}
#include <notify.h>
#include <notify_keys.h>
#include <utmpx.h>
-#include <vproc_priv.h>
#include <asl_private.h>
#include <pwd.h>
#define NOTIFY_DELAY 1
-#define forever for(;;)
-
extern int _malloc_no_asl_log;
#if TARGET_IPHONE_SIMULATOR
dispatch_resume(global.mark_timer);
}
-#if !TARGET_IPHONE_SIMULATOR
- asldebug("starting launchd input channel\n");
- /*
- * Start launchd service
- * This pins a thread in _vprocmgr_log_drain. Eventually we will either
- * remove the whole stderr/stdout -> ASL mechanism entirely, or come up
- * with a communication channel that we can trigger with a dispatch source.
- */
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
- forever _vprocmgr_log_drain(NULL, NULL, launchd_callback);
- });
-#endif
-
asldebug("starting mach service\n");
/*
* Start mach server