USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER

Hi,
I am a developer and in one of our applications we are using fork() and execv(), everything was working in Tiger and Leopard, but since the release of Snow Leopard the application gives and error and does not work. By the way the sample code below is from the Nano framework Copyright (c) 2006-2007, refNum Software <http://www.refnum.com/>.
Here's a sample crash report:
Process: Bridge Baron [587]
Path: /Applications/Bridge Baron 20/Bridge
Baron.app/Contents/MacOS/Bridge Baron
Identifier: Bridge Baron
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: Bridge Baron [559]
Date/Time: 2009-09-10 14:31:25.314 -0400
OS Version: Mac OS X 10.6 (10A432)
Report Version: 6
Interval Since Last Report: 14555 sec
Crashes Since Last Report: 1
Per-App Crashes Since Last Report: 1
Anonymous UUID: 80D0D023-6DBE-433B-A7A2-44DC020CBE34
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Application Specific Information:
abort() called
USINGFORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILEMANAGER
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x979fa972 __kill + 10
1 libSystem.B.dylib 0x979fa964 kill$UNIX2003 + 32
2 libSystem.B.dylib 0x97a8dba5 raise + 26
3 libSystem.B.dylib 0x97aa3c5c abort + 93
4 ...ple.CoreServices.CarbonCore 0x93dd0325
scserver_SCSessionUniverseDisconnectrpc + 0
5 ...ple.CoreServices.CarbonCore 0x93cdfc40
_SCSessionUniverseByUIDAcquireAndLock + 74
6 ...ple.CoreServices.CarbonCore 0x93cdfba1
FSNodeStorageGetAndLockCurrentUniverse + 192
7 ...ple.CoreServices.CarbonCore 0x93cee005 FileIDTreeGetVRefNumForDevice
+ 29
8 ...ple.CoreServices.CarbonCore 0x93cedf7e FSMount::FSMount(unsigned
int, FSMountNumberType, short*) + 62
9 ...ple.CoreServices.CarbonCore 0x93cec400 PathGetObjectInfo(char
const*, unsigned long, unsigned long, short*, unsigned long*, unsigned
long*, char*, unsigned long*, unsigned char*) + 314
10 ...ple.CoreServices.CarbonCore 0x93cec200
FSPathMakeRefInternal(unsigned char const*, unsigned long, unsigned long,
FSRef*, unsigned char*) + 134
11 ...ple.CoreServices.CarbonCore 0x93cec178 FSPathMakeRef + 47
12 com.apple.CoreFoundation 0x9629f0f4 _CFCarbonCoreFSPathMakeRef
+ 68
13 com.apple.CoreFoundation 0x9629ee3f _CFGetFSRefFromURL + 767
14 com.apple.CoreFoundation 0x9629eb32 CFURLGetFSRef + 34
15 com.bridgebaron.bbaron20 0x00143cfe NFile::SetPath(NString
const&, CFURLPathStyle) + 174
16 com.bridgebaron.bbaron20 0x001847e0 NTask::LaunchChild() + 114
17 com.bridgebaron.bbaron20 0x00184d80 NTask::Launch() + 256
In Launch() we do:
/* NAME:
NTask.cpp
DESCRIPTION:
Command line task.
COPYRIGHT:
Copyright (c) 2006-2007, refNum Software
<http://www.refnum.com/>
All rights reserved. Released under the terms of licence.html.
// Fork the command
mChildPid = fork();
switch (mChildPid) {
case -1:
// Handle failure
return(dsBadLaunch);
break;
case 0:
// We're the child
close(FD_STDIN);
close(FD_STDOUT);
close(FD_STDERR);
dup2(pipeStdIn [PIPE_CHILD], FD_STDIN);
dup2(pipeStdOut[PIPE_CHILD], FD_STDOUT);
dup2(pipeStdErr[PIPE_CHILD], FD_STDERR);
LaunchChild();
_exit(1);
break;
default:
// We're the parent:
close(pipeStdIn [PIPE_CHILD]);
close(pipeStdOut[PIPE_CHILD]);
close(pipeStdErr[PIPE_CHILD]);
mStdIn = pipeStdIn [PIPE_PARENT];
mStdOut = pipeStdOut[PIPE_PARENT];
mStdErr = pipeStdErr[PIPE_PARENT];
fcntl(mStdOut, F_SETFL, O_NONBLOCK);
fcntl(mStdErr, F_SETFL, O_NONBLOCK);
mTimer.AddTimer(BindSelf(NTask::CheckStatus), kTaskStatus, kTaskStatus);
// then in on timer we wait for the child process to exit
break;
in LaunchChild() we do the execv:
void NTask::LaunchChild(void)
{ UInt32 n, numArgs;
const char **argList;
int sysErr;
// Build the argument list
// The argument list is prefixed with the name of the command, and
// terminated with a NULL pointer.
// Since the execv will overlay this process with the child process,
// we can strdup our strings since they will be released with us.
numArgs = mArguments.size();
argList = (const char **) calloc(numArgs + 2, sizeof(const char *));
if (argList == NULL)
return;
argList[0] = strdup(NFile(mCommand).GetFileName().GetUTF8());
for (n = 0; n < numArgs; n++)
argList[1 + n] = strdup(mArguments[n].GetUTF8());
// Execute the command
sysErr = execv(strdup(mCommand.GetUTF8()), (char * const *) argList);
NN_ASSERT(sysErr == 0);
exit(EXITFAILURE);
}

Rather than commenting it out, you could define a compiler parmeter:
[code]
  -define=CONFIG::includeAndroidANE,true
[/code]
Then, in your code, wrap any references to the problem code in the config statement
[code]
CONFIG::includeAndroidANE
import the.problem.package.ProblemExtensionClass;
[/code]
And:
[code]
CONFIG::includeAndroidANE
   if(ProblemExtensionClass.isSupported()) {
        var v:ProblemExtensionClass = new ProblemExtensionClass();
         v.init();
         v.doSomethingThatIsntSupportedOnAMac();
[/code]
Then, when you compile for Mac, you just need to set CONFIG::includeAndroidANE,false;
This is what OSMF does to support different versions of the player, and also what SWIZ do to support different versions of Flex.
All good.
G

Similar Messages

Maybe you are looking for

  • Oracle 9i installation error on AIX 4.3

    Hi Dears, i am trying to install oracle 9.0.1 on iBM-AIX 4.3.but when i run runInstaller script i got the follwonig below error error in writting to directory /tmp/Oinstall. please ensure that this directory is writable and has alleast 25MB of disk s

  • Can't Connect via XP

    I've just installed my new Airport Extreme N base station and updated both the software and firmware for the unit. I have a sold green light on the front of it, so it appears everything was updated properly. I connect my Mac (this computer) via ether

  • Can I use my electric piano on GarageBand

    Can I use my electric piano on GarageBand? What cables do I use? What do I click on in the app?

  • My clock is 6 min fast, how can I correct it?

    The Date and time on the top right bar, which I believe comes from my wireless connection via ComCast, is 6 minutes faster than the time displayed on the TV. Is there a way to reset the time? My laptop is a MacBook Air

  • Sales Intelligence dashboard value has zero

    Hi all, I woking in sales intelligence.I run the dashboad all values should be zero. Any one have a idea help me. Regards, M.Soundrapandian