[RFC][PATCH] Using "lyx_tmpdir" magic constant
Enrico Forestieri
forenr at lyx.org
Mon Feb 17 10:29:19 UTC 2020
On Mon, Feb 17, 2020 at 10:05:01AM +0100, Stephan Witt wrote:
> Hi all,
>
> while trying to understand how temp directory management works
> I’ve stumbled over the „lyx_tmpdir“ string constant use.
>
> 1. This magic name should be coded in filetools only.
> For this I didn’t prepare a patch.
>
> BTW: is the code in lyxSockets() of lyxclient ok?
> There is a check for "lyx_tmpdir" + pid but I cannot see
> how this match should happen.
Normally, lyxclient looks for all temporary directories and returns
all the ones in which it finds a lyxsocket. One can restrict the
search to a particular one by specifying -p pid on the command line,
otherwise pid is empty.
The documentation has to be updated for specifying that pid is
actually the stem of "lyx_tmpdir" and not the pid of the process.
> 2. The attached patch simplifies LyX::prepareExit()
> IMO it’s safe and an improvement. Isn’t it?
I don't think you need a nod to apply this patch ;-)
--
Enrico
More information about the lyx-devel
mailing list