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@FWA002495 ~ >$ echo test > foo sbaker@FWA002495 ~ >$ ls -l foo -rw-r--r-- 1 sbaker Domain Users 5 May 2 19:47 foo sbaker@FWA002495 ~ >$ cat foo test sbaker@FWA002495 ~ >$ rm foo rm: remove regular file 'foo'? y rm: cannot remove 'foo': Invalid request code sbaker@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