fork() compiled in Tiger doesn't work in Panther? - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Programming Languages & Scripting (/forum-8.html)
+--- Thread: fork() compiled in Tiger doesn't work in Panther? (/thread-4883.html)
fork() compiled in Tiger doesn't work in Panther? - akb825 - Oct 24, 2005 09:46 AM
My fractal program (that nobody seemed to have seen ) uses fork() to process 4 different threads to calculate the fractal. It works just fine on my computer that has Tiger, but I tried it on my parent's computer that has Panther (most recent version), and it doesn't seem to call fork. At first I thought it was because it it didn't recognize the cStringUsingEncoding method of NSString, and was just returning from the function, but I changed it to use cString and sent it to my parents, and they said it still does nothing. When I was there, I saw that it didn't ever create any more processes.
So can anybody tell me if Tiger introduced some different way to do fork() or something, causing it to not work in Panther when compiled? Can anybody help me out by download the program here and see if they can get it to work on Tiger or Panther?
BTW, if it says 0% and never updates, it's safest to click stop before quitting.
fork() compiled in Tiger doesn't work in Panther? - unknown - Oct 24, 2005 09:50 AM
Youve fixed it for me 10.3.9, It used to give 0% and not change, but It works now.
Are you parsing the equation every time, because its a bit slow on my computer.
also you shouldn't allow the user to resize the window once rendering has started
Arg, I put siqn(z) + c in and I had to force quit.
fork() compiled in Tiger doesn't work in Panther? - akb825 - Oct 24, 2005 10:59 AM
Thanks. I'm guessing my parents just quit it when it was loading and didn't see the percentage at the bottom. I'll see about fixing those few things. It's slow because it has to calculate the fractal for every single pixel individually. I don't know any of the cheating formulas for any of the sets, so it's not going to be as fast as Ultra Fractal or anything like that. Even those Ã¼ber commercial programs are going to be slow, because there are still many, many calculations per pixel. Basically, with my app, the most it will calculate is the number of iterations per pixel. If it goes outside the escape radius before that number, though, it will go on to the next pixel. I was sure to make it only parse the formula once when making this, though, to make sure that didn't slow it down.
BTW, why didn't you tell me before that it didn't work?
Edit: Hm, I tried putting in siqn(z) + c and it just told me that I had an unknown symbol. I specifically made sure to handle bad input such as that. So does it just freeze for you or something? Do other syntax errors and unknown symbols cause the same freezing error, or does it actually show an error at the bottom?
Editx2: I fixed the resize when calculating bug. Instead of just disabling it, you can resize all you want, but it just won't affect the final image at all. (like how it works after you calculate)