On Tue, Jan 15, 2008 at 05:17:09PM -0500, rgheck wrote:

> I was puzzled by this, too, but reading Abdel's code, I think he was 
> thinking more in terms of threads than in terms of processes, and so not 
> seeing that each process has its own memory space.

Yes, probably.

> That said, and on a slightly different topic, I think implementing a 
> fork for the LaTeX stuff wouldn't be hard if we could rely upon shared 
> memory to pass back the error list. Is this hard to do? or is it trivial 
> if the child process keeps a pointer to that structure? Presumably, this 
> structure needs to be dynamically allocated, and the pointer should be a 
> shared pointer, so the memory won't be released in case the parent 
> should happen to die before the child. (I see warnings about this too in 
> the ForkedProcess code.) And then when the child is done, it signals the 
> parent, and the parent can look at the error list, etc.

If your concern is inter-process communication, I think that in a
child-parent context this is best accomplished through unnamed pipes.
I am sure that even MSVC has the pipe() call.

> I mention all of this only because it is SUCH a common user request. To 
> be sure, there are other issues: It'll be very hard to match the errors 
> with locations in the LyX file if the LyX file has changed. But then, an 
> option would be to retain a copy of that buffer in memory, and then 
> display it, with the errors tagged to it, if indeed there are errors. 
> OK, so maybe that's not trivial. But it doesn't sound terribly 
> impossible. Or are there other issues I'm missing?

I don't think that the LyX design allows that easily and, frankly, I
don't think that it is a good idea. What has sense, IMHO, is allowing
to work on a different file while another one is being processed by LaTeX.
Then, I am not as good as a computer at multitasking, so I don't miss
this feature either ;-)

-- 
Enrico

Reply via email to