From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27466 invoked by alias); 14 Jun 2010 14:05:53 -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: 28039 Received: (qmail 13641 invoked from network); 14 Jun 2010 14:05:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Mon, 14 Jun 2010 15:05:21 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: zsh doesn't load HISTFILE from readonly directory Message-ID: <20100614150521.068ec280@csr.com> In-Reply-To: References: Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.9; i686-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 14 Jun 2010 14:05:21.0831 (UTC) FILETIME=[A0BE3370:01CB0BCA] X-Scanned-By: MailControl A_09_40_00 (www.mailcontrol.com) on 10.71.0.131 On Sun, 13 Jun 2010 13:17:37 +0000 (UTC) J=C3=B6rg Sommer wrote: > if the directory, containing the history file, is not writeable, zsh > doesn't load the data and I've not history. Yes, it's returning after not being able to lock the file. This is unhealthy because (1) there's no error, which might be arguable for normal interactive history but is certainly wrong for an explicit "fc -R" (2) there's no reason why it shouldn't just read the history. Not immediately sure how wide the scope of the fix should be. Get locking to check if the file is not writeable for some reason (which is a different test from checking if it can be locked)? Do we need to remember that we didn't lock it to avoid errors later? Or should we simply issue a warning when and continue any time we can't lock the file? That's simple but it's not very safe if the file can be written and shared history is in use. --=20 Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, = UK Member of the CSR plc group of companies. CSR plc registered in England and= Wales, registered number 4187346, registered office Churchill House, Cambr= idge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom