• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dyld: DYLD_ environment variables warnings - just annoying?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dyld: DYLD_ environment variables warnings - just annoying?


  • Subject: Re: dyld: DYLD_ environment variables warnings - just annoying?
  • From: Jerry Krinock <email@hidden>
  • Date: Tue, 04 Sep 2012 17:11:58 -0700

On 2012 Sep 04, at 06:45, Ken Thomases <email@hidden> wrote:

> You can explicitly set the environment of the task.  When doing so, you can start with a copy of your main process's environment, but filter out the DYLD_* variables.

Thank you, Ken.  That worked.  Code below.

> Or you can simply ignore it.

Can't ignore much on 11-inch display.

> Lastly, some but not all of the things which /bin/ps can accomplish can also be accomplished through APIs like sysctl().  If you haven't already, you should consider going that route.

I've considered that before, made a note to revisit some day and make sure.

Jerry



if ([command hasSuffix:@"/ps"]) {
    NSDictionary* environment = [[NSProcessInfo processInfo] environment] ;
    NSMutableDictionary* taskEnvironment = [[NSMutableDictionary alloc] init] ;
    for (NSString* key in environment) {
        if (![key hasPrefix:@"DYLD_"]) {
            [taskEnvironment setObject:[environment valueForKey:key]
                                forKey:key] ;
        }
    }
    [task setEnvironment:taskEnvironment] ;
    [taskEnvironment release] ;
}


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >dyld: DYLD_ environment variables warnings - just annoying? (From: Jerry Krinock <email@hidden>)
 >Re: dyld: DYLD_ environment variables warnings - just annoying? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: dyld: DYLD_ environment variables warnings - just annoying?
  • Next by Date: Where are things like HEADER_SEARCH_PATHS_QUOTED_FOR_PROJECT ?
  • Previous by thread: Re: dyld: DYLD_ environment variables warnings - just annoying?
  • Next by thread: Where are things like HEADER_SEARCH_PATHS_QUOTED_FOR_PROJECT ?
  • Index(es):
    • Date
    • Thread