DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5AD5HIqJ2734347 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5AD5HIqJ2734347 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=Sc0Yfof5 X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22C613858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1763011036; bh=yLkCYJFQga3m9k5B6iMa9/PnygtLZJeTJaKrawO+t3o=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Sc0Yfof5IQxTtmj0XrCxW+Q+jnDP4imRovJWz6hFpdl9wRaY5+Wby2BRZI6eys9B3 eLVMH+nub19Zb0A7Q5L8llhQ6Gawukfm/0FC0w/WWEx3T+3KLp7j/pVD1/Sd1lGr+J Y9ew5aLyUn02P1ttfzhSupTDTk9EtNtxYikft0YE= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 61EB53858D20 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 61EB53858D20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763011012; cv=none; b=LT/GX+4zfhM1OCGpOIpw+0/OF2FSgxvfRMJS771/iWCPMQ9/qpapyYcubC1xyf/9IF0M9FyUfdYCZ53rNo68ejgcJPnP1uT3T2N7rO6dXSHLpvMHYHYzDRoXHXsGnw8VPZj4zL9RXlZ5qw7m1wgGWaNVFKPvZ654QIZxJLXw5Ck= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1763011012; c=relaxed/simple; bh=EKUbTisHdjBufvvlSuUV/C0dJ5piNj1nzjoZk7i3cEs=; h=DKIM-Signature:Subject:To:From:Message-ID:Date:MIME-Version; b=LHadS8M0IiTNLrvDmETgGE38hhtMHMgWQwONRfxSWTffSE3v6CJH6T2rzpuqWSEe2bWsY/GD/D+LU2LyPW6NGcBDGJC9LrTWMlmsZ2jZ6uzhX50wLCqt3ADJkPxfeEz9bbVIt+YyjU3z8bNJWNJAe91K0zEuHsblBUX/e9G8G+s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 61EB53858D20 Subject: Re: flock/open random error To: cygwin AT cygwin DOT com References: <20251112182412 DOT ba3a65f36838b9b5fd7d3f9b AT nifty DOT ne DOT jp> Organization: WiseMo A/S Message-ID: Date: Thu, 13 Nov 2025 06:16:49 +0100 X-Mailer: Epyrus/2.1.3 MIME-Version: 1.0 In-Reply-To: <20251112182412.ba3a65f36838b9b5fd7d3f9b@nifty.ne.jp> Content-Language: en-US X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jakob Bohm via Cygwin Reply-To: Jakob Bohm Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 5AD5HIqJ2734347 On 12/11/2025 10:24, Takashi Yano via Cygwin wrote: > On Tue, 21 Oct 2025 17:41:51 -0700 > Nahor wrote: >> ... >> >> I haven't been able to reproduce the missing data in the history file >> so it's unknown if it's an issue in Fish or flock not locking properly >> at times. So far the test passes on Linux and MacOS. > Thanks for the report. > > Do you have any evidence that flock() should be MT-safe? > This issue seems to be caused by the fact that flock() in > cygwin is not MT-safe. > > If flock is guarded by mutex in your test case, the issue > does not happen. > By definition, all standard APIs and certainly all synchronization APIs on systems with threads support need to be thread safe to avoid embarrassing failures. Enjoy Jakob -- Jakob Bohm, CIO, Partner, WiseMo A/S. https://www.wisemo.com Transformervej 29, 2860 Søborg, Denmark. Direct +45 31 13 16 10 This public discussion message is non-binding and may contain errors. WiseMo - Remote Service Management for PCs, Phones and Embedded -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple