Subject: Double Backslash/Space exec Argument Problem
From: Jason Tishler <[email-masked]>
To: Cygwin <[email-masked]>
Date: Wed, 18 Oct 2000 14:15:04 -0400

Cygwin appears to double up backslashes in arguments containing spaces
when passed from a Cygwin program (e.g., bash) to a native Win32 program:

    $ foo 'C:\duda man'
    argv[1] = (C:\\duda man)
                  ^
                  +--- doubling

    $ foo 'C:\dudaman'
    argv[1] = (C:\dudaman)

However, when foo is run from cmd:

    H:\> foo "C:\duda man"
    argv[1] = (C:\duda man)

    H:\> foo "C:\dudaman"
    argv[1] = (C:\dudaman)

the doubling doesn't occur.

Note that foo.c compiled with gcc does not exhibit the doubling regardless
of the shell from which it is invoked.

See attached for foo.c.

Thanks,
Jason

P.S. The only reason that I stumbled across this, is that on Windows
98 the (non-leading) double backslashes are treated as UNC while on NT
they are not.  Hence, code that was running fine on NT started failing
with ERROR_BAD_NETPATH after long delays on 98.  Now I understand why
the Cygwin team holds Windows 9X in such high esteem! :,)

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corporation         Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: [email-masked]
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com
--
Want to unsubscribe from this list?
Send a message to [email-masked]