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 passes argv with preserved (") quote. and it is undesired result.


hi
here is testcase to reproduce the problem

#include <stdio.h>
#include <assert.h>
int main(int argc, char**argv)
{
printf("argv %s",argv[1]);
open(argv[1],"r");
assert(fp);
return 0;
}
build
make ¤±.txt in directory.
and run in cmd.exe
type,
a "¤±.txt"

and it complains file can't be opened.
and you can see argv[1]  is passed with preserved quote (") although it is 
invoked in winshell
it must be eliminted when it is transduced to cygwin environment.

but when parent process is cygwin, it gives no complaint
>strace a "¤±.txt"
in result, is it designed to do so?
(well i assume it bug.)
if not, how this can be avoided?? 




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