This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cygwin 1.7.5 fork() bug


fork() may translate a wrong encoded path name to CreateProcessW in somecase.

My cygwin version:

$ uname -a
CYGWIN_NT-5.1 bambo-notebook 1.7.5(0.225/5/3) 2010-04-12 19:07 i686 Cygwin

This happens in windows XP with multi-byte characters support, for
example, I use a system with GBK as default.
If the path to the executable contains multi-byte characters,
CreateProcessW will fail and report file(executable) not found in
somecase.

The follow shows how this happen.

[Bambo@bambo-notebook 正虹]$ pwd
/cygdrive/d/正虹
                ^^^^^^ Here's some multi-byte characters to the executable.
[Bambo@bambo-notebook 正虹]$ cat test.c
#include <unistd.h>

int main()
{
        fork();
}
[Bambo@bambo-notebook 正虹]$ make test
cc     test.c   -o test
[Bambo@bambo-notebook 正虹]$ export LANG=en_US.GBK
[Bambo@bambo-notebook 正虹]$ ./test.exe
[Bambo@bambo-notebook 正虹]$ export LANG=en_US.UTF-8
[Bambo@bambo-notebook 正虹]$ ./test.exe
      3 [main] test 5836 fork: child -1 - CreateProcessW failed, errno 2


cygcheck.out is attached.

Attachment: cygcheck.out
Description: Binary data

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]