delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 011E53890425 |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
s=default; t=1588698786; | |
bh=6xvhOlgtCAozrB02qtL4wmp+MjxGIv0zg/jUqiK34xk=; | |
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: | |
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: | |
From; | |
b=sf8MvD1N4dxDLOddXVz0lpBMKn/1RE9AhHF8beKXM9HpiHDAtU3kO6AbgpVUO7ULU | |
Lnubtgk88YQ+aOhMtuTz0yLfXl2k7TYZ/gFsRlnokOpUKTKkLa0o/CLpd3q85HouU4 | |
P3xdgUuVK3OfIbUbxF1V2jZ9e4xM+Or8AkbPe34g= | |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org AA796388F40E |
X-Google-DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; |
d=1e100.net; s=20161025; | |
h=x-gm-message-state:mime-version:references:in-reply-to:from:date | |
:message-id:subject:to; | |
bh=EzGqJkcTD48yrnMcGOioLN80Uc00HhcBc0ZpTaO8fGM=; | |
b=gAcmjN6op0nh5SxYTrDvFIuXKcF6XhrlcvsJxM4vUvPwVoizbE+kHZJs7pklU4TrGA | |
JdUjNK04FR51bFLtLIwOiRy5m+FPOqewmjwRE+5N3rzmgKRDe8WUZgF+8pqFIsfLwZVn | |
29/unbFjNhIxraoxtXLxkIsKDMCuyViUdWRnFFEa+SAOvjji14gLaPbuQy232mes5EBQ | |
rNVW3OXuhBfmmIIBdcF7OtwL4tdViQn2mXMRoErZTCz7l6XGKlDPQBajSPkLl/au+p3u | |
OJuVRfF8ByPUxPX0NRC6icBcIppeFr9MMzIAKcgeZpI/oKEzZQ9Pki6nmgN5FNAQw8Zg | |
+O3Q== | |
X-Gm-Message-State: | AGi0PuaAnrwx0MsvSzuEaP6oCyou+rAuyouQ3CSrLmKwpT2UQmTZd4/K |
+9ipVtllME0nPBg7n4YkI8FUM3HwI49ieq6GL154HMnm0bU= | |
X-Google-Smtp-Source: | APiQypJg8UnB48yJWgNej16WPy71mMZIWUdnLQj2LXlGDu/gqmoLImh0oUSctSyGieGos+aSC5BlrAmMtKFlYUwqmDE= |
X-Received: | by 2002:a2e:7508:: with SMTP id q8mr2519030ljc.234.1588698771690; |
Tue, 05 May 2020 10:12:51 -0700 (PDT) | |
MIME-Version: | 1.0 |
References: | <CAAAwJxtZnySvW3mDhcPLgf6BpMS7Ffx=z03EqvJrOuxp3m3x-g AT mail DOT gmail DOT com> |
In-Reply-To: | <CAAAwJxtZnySvW3mDhcPLgf6BpMS7Ffx=z03EqvJrOuxp3m3x-g@mail.gmail.com> |
Date: | Tue, 5 May 2020 13:12:27 -0400 |
Message-ID: | <CAAAwJxu0MYvua8-ubPOu4eNx0Ue4OfTvNeiJOBZ=AioX8nKV9Q@mail.gmail.com> |
Subject: | Re: Invalid request code when removing files |
To: | cygwin AT cygwin DOT com |
X-Spam-Status: | No, score=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, |
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, | |
FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, | |
TXREP autolearn=ham autolearn_force=no version=3.4.2 | |
X-Spam-Checker-Version: | SpamAssassin 3.4.2 (2018-09-13) on |
server2.sourceware.org | |
X-Content-Filtered-By: | Mailman/MimeDel 2.1.29 |
X-BeenThere: | cygwin AT cygwin DOT com |
X-Mailman-Version: | 2.1.29 |
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: | <http://cygwin.com/mailman/listinfo/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
From: | Sean Baker via Cygwin <cygwin AT cygwin DOT com> |
Reply-To: | Sean Baker <sbaker48 AT gmail DOT com> |
Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com> |
strace shows this failure: 68 368896 [main] rm 1823 _unlink_nt: Trying to delete \??\C:\Test\test, isdir = 0 458 369354 [main] rm 1823 _unlink_nt: \??\C:\Test\test, return status = 0xC0000002 70 369424 [main] rm 1823 seterrno_from_nt_status: /home/corinna/src/cygwin/cygwin-3.1.4/cygwin-3.1.4-1.x86_64/src/newlib-cygwin/winsup/cygwin/syscalls.cc:1116 status 0xC0000002 -> windows error 1 70 369494 [main] rm 1823 geterrno_from_win_error: windows error 1 == errno 54 64 369558 [main] rm 1823 unlink: -1 = unlink(/cygdrive/c/Test/test), errno 54 The full strace is available here: https://pastebin.com/S2iQ7UEN Also, this is what shows up in Procmon: <event> <ProcessIndex>912</ProcessIndex> <Time_of_Day>12:49:56.5313995 PM</Time_of_Day> <Process_Name>rm.exe</Process_Name> <PID>16120</PID> <Operation>SetDispositionInformationEx</Operation> <Path>C:\Test\test</Path> <Result>NOT IMPLEMENTED</Result> <Detail>Flags: FILE_DISPOSITION_DELETE, FILE_DISPOSITION_POSIX_SEMANTICS</Detail> </event> I should mention that I also cannot delete files with Windows 10 WSL. It fails with that "Function not implemented" rather than "Invalid request code", though it seems like it must be related. PS C:\Windows\system32> wsl sbaker AT FWA002495 /mnt/c/Windows/system32 $ rm -f /mnt/c/Test/test rm: cannot remove '/mnt/c/Test/test': Function not implemented On Sat, May 2, 2020 at 8:09 PM Sean Baker <sbaker48 AT gmail DOT com> wrote: > I just installed Cygwin on a new Windows 10 machine. I am getting an error > "Invalid request code" whenever I try to remove a file. Every other file > operation that I have tested so far seems to work fine. > > Using a Windows CMD prompt, I can remove the file with the normal windows > DEL command. However, if I try to execute C:\cygwin64\bin\rm.exe it still > fails with "Invalid request code". > > This problem does not just occur with the 'rm' command. For example. 'vi' > and 'git' cannot remove the lock files that they create. Also custom > programs that I write myself and compile under Cygwin fail with the same > error code when trying to remove files, even when executed from a Windows > CMD prompt or clicked on in Windows explorer. The location of the file does > not matter either, since I have tried files in the Cygwin home dir, my > Users directory, My Documents, etc with the same result. > > However I have also installed MinGW, and in both the Cygwin terminal and > Windows CMD prompt I can remove files successfully by calling the rm.exe > installed there (see examples). > > Example under Cygwin: > > sbaker AT FWA002495 ~ >$ echo test > foo > sbaker AT FWA002495 ~ >$ ls -l foo > -rw-r--r-- 1 sbaker Domain Users 5 May 2 19:47 foo > sbaker AT FWA002495 ~ >$ cat foo > test > sbaker AT FWA002495 ~ >$ rm foo > rm: remove regular file 'foo'? y > rm: cannot remove 'foo': Invalid request code > sbaker AT FWA002495 ~ >$ /cygdrive/c/MinGW/msys/1.0/bin/rm.exe -v foo > removed `foo' > > Example under Windows CMD: > > C:\Users\sbaker>echo test > foo > C:\Users\sbaker>c:\cygwin64\bin\rm.exe -v foo > /usr/bin/rm: cannot remove 'foo': Invalid request code > C:\Users\sbaker>c:\MinGW\msys\1.0\bin\rm.exe -v foo > removed `foo' > -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |