Skip navigation.
 
mlRe: Foundation Tool works(TM) from XCode, bu t eventually fails from CL
FROM : Douglas Davidson
DATE : Fri May 30 20:24:19 2008

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

Related mailsAuthorDate
mlFoundation Tool works(TM) from XCode, but even tually fails from CL Robert Kukuchka May 30, 19:51
mlRe: Foundation Tool works(TM) from XCode, bu t eventually fails from CL Douglas Davidson May 30, 20:24