delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/11/23/08:55:03

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 4ANDt2Ww818168
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 4ANDt2Ww818168
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=gnIkIFSW
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E75583857C6E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1732370100;
bh=GWxSTyOyc15wDDAyTO57FK/2gdw5hRfzT+lC5zlHRCk=;
h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=gnIkIFSWvcQ+NE0dtt95iNANMXB7EkJ3b0JiOlznvcP2cabrnqcYlXPeLHaMik9D+
yvx9Nn5p8oPOEYfIBwR+kUPBl18+6Cpzs/FnN724J2CnBpXtlaulqbuTXJWWpS9Brn
g141k1A5mcdY+Xdqcw8pJvcC4OugbuNncuIc0uW4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2DBFE3858D37
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2DBFE3858D37
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1732370039; cv=none;
b=mM+ygG3vQ0xjohcWT0IRnr0/AA89UTsKCMsB+91x5KFFVkxogDhnOnzqYMqoGpwWQTw3d1LH3rAaa+TW1KWqCLQbfkSooTpDrX5LuWnMobzRAS2/UPEMR2vBkR/DE2nZyl2xU9qAlRTux/kW9NcelMH8E1uSAORBCyyvLMigt1Y=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1732370039; c=relaxed/simple;
bh=fuDMzVc10J6SGMYqqJ4kzr/lCBqO1ujQGcblGVEJlQ8=;
h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
b=Upvjs0udLLmFyODAElGG0TaROoOYvVm3JPVpmeETKNSN+hp0N3Z4LscV+bdR2/9LRLHLoZ8n4tEp2ghKUpx14O/nibvkqi/3sHR046tVcEVAxR0ZLmoRuU0hAbhPmCkHBTt4QgifWorKdopBGf9WvsiwDOB9htF6PyphquialXI=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DBFE3858D37
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1732370037; x=1732974837;
h=to:subject:message-id:date:from:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=BWgjTJa3EtLS51upLy6T4fTbBZGniXKeaDNGBMm8NvM=;
b=KQ3nQo0ujB9CXcPioW4tySYr+HTjOhYIjNoDoMiV7Ew/a+zRzlh8cPopl4x6WRAb0n
7050rclatvc/dAOQ1N7x/YfxhTdSZNs2wDek8rxsl5PhfyFm3DeXJ/Kq0006lebjsvl9
+TWzmlRx5ta6HULFUvuki2dsU5nRjPrnojMaH1IYb+GiPA6rBZcn0NhLomxir7G0hFRe
iOTpFaoceuIHc/bn0E5hKA/k5BAAQONWmjLO+YvjrSExXtMgGBjBfv6SM6uwDD0O7YBi
fFGKUN/9Oz+ssoh1N9rtwUWQ9E/tQMoR7yK3rog9yh+C69LPJoVO3zZ9is2SYBNaRdQ5
YBEw==
X-Gm-Message-State: AOJu0Yw+yYxKFFp0RpVBgbDD5Ma1RBVWzzxeD1W2nGEsUIMUF0sGIauu
1C9inpFtTq3E1suudDuDw79wahxKEz6FX+dkq+v+rUuWIQGArNMoOPqT72d8I3rfpjzFdYD3YGM
mCg/9REW5gKLrwTDZPOclz8fMwl8VrqYY
X-Gm-Gg: ASbGnctEbw2yvtSYof90uFoJZPVhcgv5afn2ld3tejViTDJLasOYyV2OmMGAUG8gljO
htpF9GlZJ7p9FDVOgtbTvljCjQePlsXg=
X-Google-Smtp-Source: AGHT+IFMEtJV0SXhDkWKqsHJMo8gtCR2xM44NDRVm/B2BXpaNWgGjzfIsIOpXVfhejNchKdYJAJH+lGJYUT5qOiDE28=
X-Received: by 2002:a05:6000:389:b0:382:4b7c:349a with SMTP id
ffacd0b85a97d-38260b45769mr5709844f8f.4.1732370037033; Sat, 23 Nov 2024
05:53:57 -0800 (PST)
MIME-Version: 1.0
Date: Sat, 23 Nov 2024 14:53:21 +0100
Message-ID: <CALXu0Uc=wOUbEaTzpfrYdn3Q8rXcaR-if84ZWXPgFJ1qxQbizQ@mail.gmail.com>
Subject: Corrupted file name in Cygwin - does Cygwin do a silly rename if a
file is open?
To: cygwin AT cygwin DOT com, Ms-nfs41-client-devel AT lists DOT sourceforge DOT net
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Cedric Blancher via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Cedric Blancher <cedric DOT blancher AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Good afternoon!

Does Cygwin do a silly rename if a Cygwin file is open but gets
/bin/rm at the same time?

What I see is that on a NFSv4.1 filesystem a

bash -c 'touch sillytest ; ls -l ; ( command exec {n}<"sillytest" ;
print $n ; sleep 10) & sleep 1 ; ls -la ; rm -f sillytest ; ls -la ;
wait'

will send invalid characters over the network.
At first I thought it's a bug in the ms-nfs41-client filesystem
driver, but if I replace the rm -f sillytest with a cmd /C "del
sillytest" the garbage filename data goes away:

bash -c 'touch sillytest ; ls -l ; ( command exec {n}<"sillytest" ;
printf "fd=%d\n" $n ; sleep 10) & sleep 1 ; ls -la ; cmd /C "del
sillytest" ; ls -la ; wait'

I think doing a /bin/rm on an opened file causes Cygwin to rename the
file, but the destination file name is corrupted or comes from
uninitialized memory.

Ced
-- 
Cedric Blancher <cedric DOT blancher AT gmail DOT com>
[https://plus.google.com/u/0/+CedricBlancher/]
Institute Pasteur

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019