On Thu, Sep 24, 2009 at 08:51:02AM -0400, rgheck wrote: > On 09/24/2009 08:27 AM, Abdelrazak Younes wrote: > > rgheck wrote: > >> > >> I just had a thought about this Snow Leopard problem. The reports we > >> are getting say that, if you don't have autosave turned off, then > >> there is an apparent "crash" each time autosave triggers, but that > >> this isn't really a crash: You can dismiss the error and continue > >> working. That makes it seem likely that there is a crash, but that it > >> is in the spawned child process. Now just recently, Manervu has > >> written that, apparently, the problem does not affect background > >> image processing, e.g., resizing of displayed images and the like. > >> Can anyone else confirm this? > >> > >> If that is right, then it can't be the fork() call itself that is the > >> problem. > > > > It is. Forking is different from spawning child process, it is about > > spawning a copy of current running lyx process and that makes a big > > difference. Background image processing is done via external processes > > (eg: image magic). > > > Well, at least we are not the only ones seeing this problem: > http://www.stata.com/statalist/archive/2009-08/msg01552.html > http://discussions.apple.com/thread.jspa?threadID=2160394 > http://forums.adobe.com/thread/490441 > But it's very puzzling. It seems that OSX is refusing to fork() without > an immediate exec(), which makes fork() almost useless to us in this case. > > If that's right, then I think we have to treat OSX as Windows, pretty > much as Vincent suggested.
Despite Apple pushing the notion that OSX is Unix, it's not really true. OSX is a Mach kernel with Unix-like behavior and APIs. Now, Mach has no notion of Unix processes, but rather of tasks (threads), as you can read here: http://www.stepwise.com/Articles/Technical/MeetMach.html This means that OSX can't really fork(), i.e., provide an exact copy of the running process, unless exec() is immediately used, such that to overlay the current process. So, it's correct to treat OSX as Windows, after all. What puzzles me is that Cygwin is able to provide a fairly good emulation of fork() even on a hostile environment as Windows, while Apple is not... -- Enrico