Re: dyld: DYLD_ environment variables warnings - just annoying?
Re: dyld: DYLD_ environment variables warnings - just annoying?
- Subject: Re: dyld: DYLD_ environment variables warnings - just annoying?
- From: Ken Thomases <email@hidden>
- Date: Tue, 04 Sep 2012 08:45:03 -0500
On Sep 4, 2012, at 7:57 AM, Jerry Krinock wrote:
> The Mac app I am writing invokes /bin/ps via NSTask prior to performing some operations. (The app is not sandboxed, and NSWorkspace methods are not sufficient.)
>
> When testing in Xcode, every time the app invokes /bin/ps, the following line gets printed to the console in Xcode:
>
> dyld: DYLD_ environment variables being ignored because main executable (/bin/ps) is setuid or setgid
>
> I don't think I care about that, and also it is not my fault nor my concern if Apple made /bin/ps setuid or setgid. Can I eliminate or at least suppress the warning?
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.
Or you can simply ignore it. It's a consequence of running under Xcode, but won't happen in normal operation.
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.
Regards,
Ken
_______________________________________________
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