[1.7] Case-sensitive programs exist but cannot both be run

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Fri Oct 16 04:01:00 GMT 2009


It appears that two EXEs can coexist (with the registry setting) but 
only whichever one was so named first will be run:

$ cat > lower.c <<EOF
#include <stdio.h>
int main(void) { printf("I am a lower-case a\n"); return 0; }
EOF

$ cat > upper.c <<EOF
#include <stdio.h>
int main(void) { printf("I am an UPPER-case A\n"); return 0; }
EOF

$ gcc -o A.exe upper.c

$ gcc -o a.exe lower.c

$ ls
A.exe*  a.exe*  lower.c  upper.c

# note that A.exe was created first

$ ./A.exe
I am an UPPER-case A

$ ./a.exe
I am an UPPER-case A

# Say what?

$ mv A.exe A2.exe; mv A2.exe A.exe

# now a.exe was there first, let's try again...

$ ./a.exe
I am a lower-case a

$ ./A.exe
I am a lower-case a

# Oh really?

$ cat > B <<EOF
#!/bin/sh
echo "I am an UPPER-case B"
EOF

$ cat > b <<EOF
#!/bin/sh
echo "I am a lower-case b"
EOF

$ chmod +x B b

$ ls
A.exe*  B*  a.exe*  b*  lower.c  upper.c

$ ./B
I am an UPPER-case B

$ ./b
I am a lower-case b

Bug?  Limitation?  If it hurts, don't do that?


Yaakov


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list