On Mon, Dec 14, 1998 at 08:55:08PM +0100, Lars Gullik Bjønnes wrote:
> *Asger Alstrup Nielsen writes:
> | Of course we can choose not to fix the bug and document it in Bugs
> | instead for 1.0.0. And then fix it in 1.0.1 (or simply not fix it
> | in the 1.0.x series, but the bug report involved something going
> | completely nuts, so that might be a bad decision.)
>
> But what was the bug?
>
> It seemed to me that it was reLyX going into an infinite loop, and
> creating a _large_ file, so large that it filled up the whole
> filesystem.
> (something that may make huge troubles for the filesystem)
>
> And the fix proposed is to make reLyX never use tmp-files, and rather
> use stdout, and make LyX able to open a file from stdin...
One piece of the bug was that it made, apparently, an infinite loop, although
I suspect that was partly due to the unix/dos interface. (Why? Because, as I
mentioned, when I tried it on my system, I didn't get an infinite loop. I just
got a bunch of "error: trying to write to a closed file" errors, after which
reLyX died because it couldn't do the next pass. I think we'd need someone who
was perl-aware to carefully run reLyX with that unix/dos interface to see what
really went wrong.) I have fixed that piece of the bug, such that (AFAIK)
reLyX will immediately choke and die as soon as it tries to open the file &
fails. So no infinite loops.
However, the other piece of the bug still remains: namely, that you can't run
reLyX on a file that's in a read-only directory (or disk, whatever). reLyX has
to use temp files, but it can put them in /tmp if necessary. But reLyX clearly
needs to output a LyX file, and that's where the stdout suggestion comes in.
My suggestion was copying the tex file into the current directory where lyx is
creating stuff (either the temporary directory or `pwd` if you've got
use_tempdir set to false, I guess), then deleting the .tex file when you close
LyX. This doesn't use any "new technologies", which I guess reading from stdin
would require. On the other hand, it requires bookkeeping, and creates the
possibility of some extremely angry bug reports.
-Amir