Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Race condition when setting TERM{,INFO{,_DIRS}}



On Fri, Jun 30, 2017 at 1:49 PM, Guillaume Maudoux (Layus)
<layus.on@xxxxxxxxx> wrote:
> Thanks Bart,
>
> I have found the origin of this issue.
> There are no threads indeed, but there is caching in ncurses for environment
> variables.
>
> Due to a bug in ncurses' code, it failed to detect that the environment var
> changed,
> and so failed to find the terminfo database.
>
> I will send a patch upstream, with this list in cc.
>
> Zsh could avoid that by initializing the term as late as possible.
> Calling init_term before parsing zshrc, while nothing required to write in
> the terminal is premature.
> Fish for example delays initializing the terminal until the first write.
> Well, this would have avoided my issue, but it is not sufficient in the
> general case anyway.

Plenty of people (including me) write to the terminal from zshrc and
other initialization files.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author