From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2777 invoked from network); 5 Dec 2020 10:05:02 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Dec 2020 10:05:02 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1607162702; b=Q4V1TOneDFdrcC1PZBWnr/fz0rbHSd4QYKlsQleDOedde2nSrEb5/S9ei4qYiMHwwW+kSkmd81 pNUpzQoBnfPvYvOryEaPpTV62mYbB7i39hqhV3WHU8WrVxXNH3KVhRxFYWZ0mj5n6F6oHQJc71 Nj908qKbCj/LMX/tQrJvdSwqnDmS+CnEZIvuwFyLlatiK5jp/o1fg7nPKMv67j9iNqWGXuDeZY lLJj7V2frXG5/+6jwl2ZYowUU+FjL0gbE+W+IMdW15K8usdj43535rst8nlB9uth7cuuxyBdfc 9FKzgZHYWutszbFc8pDCLllQCeEg4iLjeHYSlnfzwNoqEQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f182.google.com) smtp.remote-ip=209.85.167.182; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1607162702; bh=eRWiCrmaCVkhOYPfaYNrhe51sTmTeXzY7kf6qmxBqLk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=Gb0kDQGMEH6JJHY4dEe4UuvcMX8z7kvEkO18lO3luiybWqn2DuCPkQfPW7knmuWpjzqmJAouXg 5p/wvS4Aix+sbUoBzMs/8uS2yqQy+lXTwijfHheQcyV1AnZ2tiaD6z5oRGx2JVFpsIuX11jFFU u1Kq5yMKZSrd5XQQdDvFAWVZnGuNG/cOM1aChy0hhcZi93rxXymRCbgA3L7qyCQiFKPeE4/vkq FK6nipzQNyCMZmyAYJkDibVPwrnRvho73qhEouKDLfSSmh5txarh1cEj5eiC+cvNLEkNNi+q20 qHWEoN4S+iW1yJAaSwZIXNSpd9+khm518ztP8Ty09kfLfg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=oX7CNz3m40Pw7OtCTmxArfXaffcInp+S/v2mVHWu6ag=; b=Tz7zsxtgSA4DzS4OAcON0eRtgj 4enLQbkzTntgi5hC4s+2ptNtH+yydQH9azo4P2RoedxEcI+V3SnDaF7AxeVyIGn9dTee+YvAtzGHN TU0lijFCrIc9sjjkUDN4unx3CfJRBcywIqBnkYzvqGlJuwR8JBWPO0TxmlY/XSWw6nArQHn3Y+Nu7 z8XxCT+24PnXASs5KUJEioHstj3Qem7kAGix/Dk0hQihtCWqMPAZcvgYwwfmQ7ghy70+guCALZnn1 aEeYBFhGhOFQMHTX89gl6dWSq5U9EVtrOxFNOBpZRuMg+wOPvpLTEy2wt7oDeStbbsOvWxxPIyYjR f0tS+FXA==; Received: from authenticated user by zero.zsh.org with local id 1klUR2-000LL0-1J; Sat, 05 Dec 2020 10:05:00 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f182.google.com) smtp.remote-ip=209.85.167.182; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-oi1-f182.google.com ([209.85.167.182]:40402) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1klUQk-000LBk-1q; Sat, 05 Dec 2020 10:04:42 +0000 Received: by mail-oi1-f182.google.com with SMTP id p126so9291263oif.7 for ; Sat, 05 Dec 2020 02:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=oX7CNz3m40Pw7OtCTmxArfXaffcInp+S/v2mVHWu6ag=; b=IrrWdkGh6F8MYvfhVK/+5oVyTT6n0L6s7pMhcwHJUtuIXzvNvM0g+awQZ/QnYMRSlN AoPbeVOY1GdVt7zP752mawtObGd1ZucFr7/WdWLS0VM9YQzvJbivXqMKQqmRhG7AwVs3 qJFoj1b9ZWhv8x8DAS8m/pIaqQUOHdgLQ+VyAD65z0/K85UJspF2XwnfPpr2xm0w5eun nlKkrAE7j7GTPWS3dpACfyCtbSspBVUp9l+0J5YmiGPwPDkrS2i3p93e2QJmUTHTeVQu mL1sq+y1N0eBDKL3H1hd2TQmVAjTPjzuomX4EIisnbzC843bzQ6AZzkCAnM3bU+mocCl VpNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=oX7CNz3m40Pw7OtCTmxArfXaffcInp+S/v2mVHWu6ag=; b=JDUmqjXgAO28+5yz7ZVCO7vpt2IKplHdGsIUD616ZCovw9uhPtUSorKGvSOlpJssHu /2JdII2W2zqsnSrjqax/Yskd/NOvtSiVWKfG9AJVfOo76N0qPP9HCdYD9NfNdkW8dsGZ sg/MJ3WcR1maEyqj0ExNrwTAzk75L8J8k4X/XD4EndpEf2ai2mgdWLWRZ1XVzAqf2njZ i464t2VmY0bxzUEUdJxVeUwEMHre5yARdq2kvKBhTevK/MqURLG9Fv6mtk/HrsG+q6wH keAl7C+ncwU5JRBnLIb1yUnLHM0d6p+W2KHvCks0s9foPNif8OCD28QXWKZ5gEAGPpo6 JB9w== X-Gm-Message-State: AOAM533XPQItsOSf0rns5t1xJbXSdIABn7PC0LnNaHupbiOZoUCWI/+s lezEpP6cTv63WvCetNC5fFvXU9SZD75+Rh84TwPK36fX+EZMFg== X-Google-Smtp-Source: ABdhPJwnfXKrGC1eN1qhRAD82/z2a5q99wCBC9NmsUwsaM7qIt/kszpVIleZk7/gWHjmzRvN0SN368Lpv48K1UWjd6o= X-Received: by 2002:a54:4494:: with SMTP id v20mr3031681oiv.169.1607162680536; Sat, 05 Dec 2020 02:04:40 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?Q?Robert_Cegli=C5=84ski?= Date: Sat, 5 Dec 2020 11:04:29 +0100 Message-ID: Subject: History not deduplicated when zsh is killed by SIGHUP To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="000000000000ab735305b5b4b801" X-Seq: 47727 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: --000000000000ab735305b5b4b801 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, I believe I discovered an issue with saving the history file. Here's a minimal reproducer: ~ =E2=9D=AF mkdir /tmp/zsh-repro ~ =E2=9D=AF print "HISTFILE=3D/tmp/zsh-repro/histfile;HISTSIZE=3D100;SAVEHIST=3D100;setopt hist_ignore_all_dups" > /tmp/zsh-repro/.zshrc ~ =E2=9D=AF ZDOTDIR=3D/tmp/zsh-repro zsh rcarch% ls >/dev/null rcarch% exit ~ =E2=9D=AF ZDOTDIR=3D/tmp/zsh-repro zsh rcarch% ls >/dev/null # scroll up 2 times rcarch% kill -SIGHUP $$ # or just close the terminal ~ =E2=9D=AF cat /tmp/zsh-repro/histfile ls >/dev/null exit ls >/dev/null kill -SIGHUP $$ If we launch zsh again and scroll up the history, we will receive duplicate entries. OS: Arch Linux zsh: 5.8, also reproducible on current master --- Robert --000000000000ab735305b5b4b801 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
I believe I discovered an issue with= saving the history file. Here's a minimal reproducer:

~ =E2=9D=AF mkdir /tmp/zsh-repro
~ =E2=9D=AF print "HISTFI= LE=3D/tmp/zsh-repro/histfile;HISTSIZE=3D100;SAVEHIST=3D100;setopt hist_igno= re_all_dups" > /tmp/zsh-repro/.zshrc
~ =E2=9D=AF ZDOTDIR=3D/tmp/= zsh-repro zsh
rcarch% ls >/dev/null
rcarch% exit
~ =E2=9D=AF ZD= OTDIR=3D/tmp/zsh-repro zsh
rcarch% ls >/dev/null=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # scroll up 2 times
rcarch% kill -SIGH= UP $$=C2=A0=C2=A0=C2=A0 # or just close the terminal
~ =E2=9D=AF cat /tm= p/zsh-repro/histfile
ls >/dev/null
exit
ls >/dev/null
kil= l -SIGHUP $$

If we launch zsh again and scroll up = the history, we will receive duplicate entries.

OS: Arch Linux
zsh: 5.8, also reproducible on current master

---
Robert
--000000000000ab735305b5b4b801--