![]() ![]() You MUST exec().īreak on _THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY_YOU_MUST_EXEC_() to debug. The process has forked and you cannot use this CoreFoundation functionality safely. Listing 13: Core Foundation complaining about fork-without-exec IMPORTANT: In fact, in Mac OS X 10.5 and later, Core Foundation will detect this situation and print the warning message shown in Listing 13. The only exception is the System framework and, even there, the POSIX standard places severe constraints on what you can do between a fork and an exec. Many Mac OS X frameworks do not work reliably if you call fork but do not call exec. In this situation it is reasonable to exec yourself. If you need to use these frameworks in the child process, you must exec. All APIs, including global data symbols, in any framework or library should be assumed to be unsafe after a fork() unless explicitly documented to be safe or async-signal safe. FreeWRL is currently packaged for Mac OS X, Linux (Gentoo, Debian, Ubuntu), and, in the near future, for Windows. It can be used as a standalone application or integrated as a browser plugin. To be totally safe you should restrict your-self to only executing async-signal safe operations until such time as one of the exec functions is called. FreeWRL log: - Welcome to FreeWRL : X3D / VRML visualization program for Linux, Mac and Windows. There are limits to what you can do in the child process. ![]() configure $my_options 158 else 159 echo "Please run configure now.In general, you need to exec() after fork() on Mac OS X. 60 61 EOF 62 exit 0 63 64 esac 65 done 66 shift $(($OPTIND - 1) ) 67 68 echo "Remaining args: # must be preceded by '-' 69 70 platform = $(uname -s) 71 72 case $platform in 73 Linux ) 74 echo "Platform: Linux" 75 76 # cflags="$cflags -D_GNU_SOURCE" 77 78 case $motif in 79 0 ) target =x11 80 1 ) target =motif 81 esac 82 83 84 Darwin ) 85 echo "Platform: Mac" 86 87 fontsdir = $default_fontsdir 88 89 echo "Mac system: default target is x11 (maybe motif)" 90 echo "(Carbon is not yet supported by this build system)" 91 92 case $motif in 93 0 ) target =x11 94 1 ) target =motif 95 esac 96 97 port = $(port version) 98 if then 99 # we have Mac Ports installed 100 add_path =/opt / local 101 fi 102 103 104 win32 |CYGWIN *|cygwin *) 105 echo "Platform: Windows ( $platform )" 106 107 fontsdir = "C: \\ Windows \\ Fonts" 108 target =win32 109 110 esac 111 112 if then 113 cflags = " $cflags -I $add_path /include" 114 lflags = " $lflags -L $add_path /lib" 115 fi 116 117 if then 118 my_options = " $my_options -enable-debug" 119 else 120 my_options = " $my_options -disable-debug" 121 fi 122 123 if then 124 my_options = " $my_options -enable-libcurl" 125 else 126 my_options = " $my_options -disable-libcurl" 127 fi 128 129 if then 130 my_options = " $my_options -enable-libeai" 131 else 132 my_options = " $my_options -disable-libeai" 133 fi 134 135 if then 136 my_options = " $my_options -enable-plugin" 137 else 138 my_options = " $my_options -disable-plugin" 139 fi 140 141 if then 142 cflags = " $cflags -DVERBOSE" 143 fi 144 145 # Strip useless spaces in cflags
0 Comments
Leave a Reply. |