X-Git-Url: https://git.saurik.com/apple/syslog.git/blobdiff_plain/5222c21d179b0b291b379bab771199072df3ea35..c58972950480a3550c3586696faabadc23bea1e4:/syslogd.tproj/syslogd.c diff --git a/syslogd.tproj/syslogd.c b/syslogd.tproj/syslogd.c index f5c3f54..2d45dc5 100644 --- a/syslogd.tproj/syslogd.c +++ b/syslogd.tproj/syslogd.c @@ -48,8 +48,8 @@ #include #include #include -#include #include + #if !TARGET_OS_IPHONE #include #endif @@ -65,8 +65,6 @@ #define NOTIFY_DELAY 1 -#define forever for(;;) - extern int _malloc_no_asl_log; #if TARGET_IPHONE_SIMULATOR @@ -483,18 +481,6 @@ main(int argc, const char *argv[]) } #endif -#if TARGET_OS_IPHONE - /* - * Reset owner, group, and permissions in /var/mobile/Library/Logs - * in case something created them incorrectly. syslogd was - * guilty of this in the past, creating them with owner root. - */ - - asl_secure_chown_chmod_dir("/private/var/mobile/Library/Logs", 501, 501, 0755); - asl_secure_chown_chmod_dir("/private/var/mobile/Library/Logs/CrashReporter", 501, 501, 0755); - asl_secure_chown_chmod_dir("/private/var/mobile/Library/Logs/CrashReporter/DiagnosticLogs", 501, 501, 0755); -#endif - /* Set I/O policy */ setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS, IOPOL_PASSIVE); @@ -732,19 +718,6 @@ main(int argc, const char *argv[]) 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