From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4445 invoked by alias); 30 Jun 2017 12:34:59 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41380 Received: (qmail 16706 invoked from network); 30 Jun 2017 12:34:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.172):SA:0(0.5/5.0):. Processed in 3.042228 secs); 30 Jun 2017 12:34:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_SORBS_SPAM, SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.172 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=K1BLy98hTkYRP/04PJPcdvJPnbBuWsWB8jkKpdsAWkI=; b=GXzNI0zX8zP1nNPnfRy+zUvcdVrEYpdirolen+jKcqsHW7ulYnWxb2Lc4IG0qrDYsy 8ETnash5b24+MWfipSsbCyHTvF7gD8mS+WJu7o/VEoG2saRYE6HdAieP48cxabeApIBJ 5f2Q+/fqQUvTh68WWt/JWmvfLUCO3u79sull0NtrWysc1aBJfr2UczdKS7xkD0P2+32o GHhKu5Hffxx/tNLG73Q8plXEBsiw3ovUEX6o7LdP4BCJcHJafsELJmGHjlro1QH4RfXX L1ggukpjWJwoGg70/U/q59DBSSHBrwI2czgWC1ebc4GPpLkWPk22+e7X4oPhkAJMZw9E KTEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=K1BLy98hTkYRP/04PJPcdvJPnbBuWsWB8jkKpdsAWkI=; b=KnYP4aEoA81ib3OKBYS2lb/b24ISQLzdIzyFotX+CM73icSJQzFQsk9Uue/lNKL7GS qv3G5k6nmARufwIGzHB6Q0bxymIItOF2YQFD71AxbwT9EQRaXuEA17AI3+8v0BUS1kqx z5hQgqK5BSGVauMHJq/BIH14CYPbfhDdd6zOV8aOhvIcZeo529JMuvxLnwojsb0XjQc6 RhnGW3D66c7ES4lo3KUQRzKkuwhNj0W6aBCUvqtyikdSyjEF0fAITwD7NtayAvYJkJY0 6mLaByg+6uz7uLigjV2tLfND/SUw2/T98V3wprcSZIQwc8pZs7Rmhh4ZXL3qLcvIIgAW /eVw== X-Gm-Message-State: AKS2vOx5G7yhkY9k+55WXzBi0/TcWULhNeEZw/GIesBcHgOjmvWkjgAz 7o34iPhqngp2EAXn1KZfurWxjNT4Sw== X-Received: by 10.200.13.4 with SMTP id q4mr21220376qti.221.1498826087086; Fri, 30 Jun 2017 05:34:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <45762363-3882-27b8-8433-63ccfdc0b8be@gmail.com> References: <2ad57c3b-f0c4-afd9-4789-ae50571c63e1@gmail.com> <170627143044.ZM8536@torch.brasslantern.com> <45762363-3882-27b8-8433-63ccfdc0b8be@gmail.com> From: Mikael Magnusson Date: Fri, 30 Jun 2017 14:34:46 +0200 Message-ID: Subject: Re: Race condition when setting TERM{,INFO{,_DIRS}} To: "Guillaume Maudoux (Layus)" Cc: Bart Schaefer , zsh workers Content-Type: text/plain; charset="UTF-8" On Fri, Jun 30, 2017 at 1:49 PM, Guillaume Maudoux (Layus) 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