I see a file called "ICanReadIt" created, meaning that I can read the
file I wrote within the same program, immediately after it is
written. This is what I'd expect.
However, from the parent program that calls this small program, I get
this strange problem.
I get an non-zero err here, unless I wait for over 0.125 seconds
after the auxilliary app exits.
while (MacCheckPublishAppExists()) {
WaitSeconds( 0.05 );
}
WaitSeconds( 0.13 );
BOOL Result = MacCheckPublishFileExists();
In both cases I call FSPathMakeRef! So it can't be a case of mixing
Cocoa or Carbon, can it?
I mean, the parent app is actually a Cocoa app, but in this case I'm
using Carbon calls (FSPathMakeRef) to read the file.
This doesn't really make sense to me.
If I change the above code to this:
while (MacCheckPublishAppExists()) {
WaitSeconds( 0.05 );
}
// WaitSeconds( 0.13 ); // comment out this line!
BOOL Result = MacCheckPublishFileExists();
So, we know that the app has finished. So this means by definition,
that the file is written, correct? But yet we can't read the file
till 0.125 seconds later.
Why???
Where is this documented? I don't see any such behaviour documented.
I've never come across it before also. Am I doing something wrong? Or
what's going on??
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden