Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Foundation Tool works™ from XCode, but eventually fails from CL




On May 30, 2008, at 10:51 AM, Robert Kukuchka wrote:

I've written a very basic foundation tool who's sole purpose is to save incoming serial data from a cu.foo socket into a log file that I create. Real simple stuff here. Oddly, when I run the executable in Release mode from within XCode (Apple + R) I get no problems, and it merrily logs away to it's heart's content. Whereas when I launch the foundation tool from Terminal it logs along until a certain point at which the data it pulls becomes null. Anyone have any suggestions? If this were a Debug / Release issue it'd make sense to me, but this is just how it's being launched. I guess it does raise the question that I don't know how it's launched differently, so I'll go about investigating that, but hopefully someone might have an "a - ha".

One obvious possibility to look at would be the current working directory. Xcode sets the cwd when it launches an executable, but when you run your tool from the command line, the cwd will be whatever it is. Command line tools should deal with the cwd, whatever it may be; applications, on the other hand, should not use it.


Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Foundation Tool works™ from XCode, but eventually fails from CL (From: Robert Kukuchka <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.