On Fri, 5 Oct 2001, Angus Leeming wrote: > On Friday 05 October 2001 15:44, Jean-Marc Lasgouttes wrote: > > >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > > > Angus> On Friday 05 October 2001 15:14, Jean-Marc Lasgouttes wrote: > > >> >>>>> "Jules" == Jules Bean <[EMAIL PROTECTED]> writes: > > >> > > >> >> It does not crash, it hangs... > > >> > > Jules> I'd still call it a bug. LyX should fork() before doing > > Jules> something like that... > > >> I guess the problem is the same with the converters code (if we > > >> have a bogus converter). However, the converters are forced to wait > > >> for completion before doing the next step. So how do we do that? > > > > Angus> You can pass a pointer to a function to Systemcalls. This > > Angus> function is called on completion of the forked process. Why not > > Angus> split the conversion code into two and place the "after > > Angus> conversion" stuff in this function? > > > > So, if the converter hangs, LyX hangs waiting for completion, no? > > That's not my understanding of the syscall.h comments: > > /// Uses fork() and execvp() > DontWait > };
Actually it wont work, I've checked this in the context of converting images for IG, the no wait methods in syscall will not call a callback, this specific call (DontWait), uses execvp and so never returns to LyX and only runs the requested program. I Tried at some time to write something to make it work, but it was too convulted and I abandoned that approach, what we really need is to make LyX into a multi-threaded program and have the cconversion be run in a thread. Baruch