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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15952 invoked from network); 19 Mar 2023 21:18:00 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Mar 2023 21:18:00 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1679260681; b=VkstY9rZEdf324hJ4ClLAnvsTBXMgp2r8jz4j1ilEwCibSU+IkeqSFvQz2a5SceiABVi9h+F4o BwfKqllaotxP1kGxjDEqIByEkhHqn1p+jh0aEuIX4To7huozkPK78fORry6/II31WrC6U3J0oH j/IIcqcSAuNVmwfneR+fMfQ8vD3vXePLlrP/ZO/0QRIX+XJ+IFUI4MV0MQ3MFob68OuZYCxXJq FWg14qO+1UZPJlSiugYOv9ntutL6WobuAn62Ms63dnjhSyGOHi/502alIGnAeXU5zYzOb6q+94 9l9TmU1ZmN4eMRq7mPQeJzCqdT8kSPwgEphv+T+8Wm/hlg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-40133.protonmail.ch) smtp.remote-ip=185.70.40.133; dkim=pass header.d=protonmail.ch header.s=protonmail3 header.a=rsa-sha256; dmarc=pass header.from=protonmail.ch; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1679260681; bh=G0jPlz0QTeTaaO/rWU0Lk+tZzLfVcYGW15Zz4hEFq+g=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Subject:Cc:From:To:DKIM-Signature:Date: DKIM-Signature; b=IoghVp2HcqlXB8FXgX8PbKxOWU0m+w+oiPLOnRMSw+Eiwy5NtB2cHl7ZLk9mGnarX80ycTj0PP tD3NfXG3HSLYtOtatQ73bs7JYy6Fy4go2dQB+0uzLw1b5pHIoQF9YANc2XOlqSBRyvY4N+T95W guaKEF0EWE/LO0pow6013y/+yRU+c2DdDC1FOxRri8loWQSYTnrl/FebDlsOkYkDhc6SP7rkRL QjLdeUS2RnuDWEbxE3jsc0+gODu8JkpKVJV9SXY1NSh9ZarkDblUCqvWgNB6hOtxd35qSTouZ0 xhXn87cyrV4WgrSTUtJIyRNYHg+W6EBxthvDXe5mhCCZAw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:From: To:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=pkxDpWXEbcSuxEMk6wR0C+8zyckR6swv3cOioa4ZuOs=; b=Vj8Ak1VwlxN+05BMvTF/59po2L tEabCIjyHZ8LiViH7lR+wMzrAqbGF8v6/C0soP6D8FZwy8FBdIxiUp76DDKQA6ypBSEOksf4Prxew l5yu8X0pDoxQ4L4EARGBLQhFM0PgvEzjSTXsatqvg1XDFgqTG2aCV/6iyPH5CAZ+wiFD7PP0iQoid nGOi2ZwvsyhRQmlc/yLyel3KCF9U5zQZe1IhU0rpYsv52P+3XSYTY9TDuY3YtCAKD8VMhfJZ/VSf/ GW6BwS+gMdzgXAshTFC/1WIi4dpRAxJHWA7LMsp8fXIxGDgQYk8rHvPYBBBVIxZOKolREw12RKT6n LTHg4Rfw==; Received: by zero.zsh.org with local id 1pe0Pg-0009sW-0Z; Sun, 19 Mar 2023 21:18:00 +0000 Authentication-Results: zsh.org; iprev=pass (mail-40133.protonmail.ch) smtp.remote-ip=185.70.40.133; dkim=pass header.d=protonmail.ch header.s=protonmail3 header.a=rsa-sha256; dmarc=pass header.from=protonmail.ch; arc=none Received: from mail-40133.protonmail.ch ([185.70.40.133]:15907) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pe0P9-0009Aw-QZ; Sun, 19 Mar 2023 21:17:29 +0000 Date: Sun, 19 Mar 2023 21:17:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=protonmail3; t=1679260646; x=1679519846; bh=pkxDpWXEbcSuxEMk6wR0C+8zyckR6swv3cOioa4ZuOs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=g7IGjkl4WXGjwaxo94hPETnRWP6uO1ELXg2D0KrDIXa2+/E1D50s+mKDRr3UxKu2Q 6qOIOsanjKKSXfs+qw+f2K45CQFx7LtwMyaCaJyYY/CWTYrwB/IUDG1THA/Ir5Jd1x IvNJYSC29DIzn4s01ilX0qCBxZdGmV84zIr7kHaCjbpP0igirB0F/8JARB7KFvfhBb hOT0UKY/PTIgMZAfbe0nigtxoJ5SrONqSTafdxBm2Ek1E+6uIj4nN1KWV6yX6zuZo8 r3Wq+rVOA1Lq6o+3KjxlzOCml6lY9lF+vUcjzI9CDUX18owLX8JbNjyK8qtozZTXwS 1tu92pRxS9Cng== To: Bart Schaefer From: Piotr Karbowski Cc: zsh-users@zsh.org Subject: Re: The HIST_EXPIRE_DUPS_FIRST might corrupt and wipe partially history file if many shells exit at the same time Message-ID: In-Reply-To: References: <33a75d10-d765-3d79-a179-943c57659111@protonmail.ch> Feedback-ID: 7579861:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 28976 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Hi, On 19/03/2023 22.01, Bart Schaefer wrote: > On Sun, Mar 19, 2023 at 11:38=E2=80=AFAM Piotr Karbowski > wrote: >> >> The HIST_SAVE_BY_COPY does not seems to be enabled and I am unable to >> enable it. > > "setopt" with no arguments shows you only the options that differ from > the defaults. So if HIST_SAVE_BY_COPY does not show up, it IS > enabled. > > Use "set -o" (with no other arguments) to see the full set of options > and on/off status, or "setopt kshoptionprint" before running "setopt" > alone. > > If an option shows up with a "no" prefix in unsetopt output, that > means it is on. There is no third state. That make sense, thanks. The 'set -o' do confirm 'nohistsavebycopy off' I looked around in Src/hist.c where it does the copy history and indeed it does use O_EXCL so this it does the locking. I still did lost few thousands lines from the end of .zsh_history yesterday again when I git a bug with openbox+glib-2.76.0 that crashed entire of my X session, with many urxvt and zsh there and i had to restore it from hourly borgbackup. With this, I do not know where this problem originates from but I do see that I am not the only one and the stackoverflow user with MacOS do hit this problem as well. Anything else I could provide to help norrowing it down? -- Piotr.