X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/28398e3448af0428f93b3f4035bb0c3c95ee8263..a7b261d93482e4bd18bb904e96a4106226ca57e4:/cydo.cpp diff --git a/cydo.cpp b/cydo.cpp index 6fcde151..168d3c8a 100644 --- a/cydo.cpp +++ b/cydo.cpp @@ -68,6 +68,19 @@ int main(int argc, char *argv[]) { if (pid != parent) return; + auto variables(launch_data_dict_lookup(value, LAUNCH_JOBKEY_ENVIRONMENTVARIABLES)); + if (variables != NULL && launch_data_get_type(variables) == LAUNCH_DATA_DICTIONARY) { + auto dyld(false); + + launch_data_dict_iterate(variables, [&dyld](const char *name, launch_data_t value) { + if (strncmp(name, "DYLD_", 5) == 0) + dyld = true; + }); + + if (dyld) + return; + } + auto string(launch_data_dict_lookup(value, LAUNCH_JOBKEY_PROGRAM)); if (string == NULL || launch_data_get_type(string) != LAUNCH_DATA_STRING) { auto array(launch_data_dict_lookup(value, LAUNCH_JOBKEY_PROGRAMARGUMENTS)); @@ -85,7 +98,6 @@ int main(int argc, char *argv[]) { if (program == NULL) return; - fprintf(log, "%lld %s\n", pid, program); if (strcmp(program, "/Applications/Cydia.app/Cydia") == 0) cydia = true; });