This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygwin programs called from non-cygwin programs mauling \" in args
- From: Yitzchak Scott-Thoennes <sthoenna at efn dot org>
- To: cygwin at cygwin dot com
- Date: Wed, 19 Jan 2005 15:34:10 -0800
- Subject: Re: cygwin programs called from non-cygwin programs mauling \" in args
- Organization: bs"d
- References: <20050113064248.GA2416@efn.org>
On Wed, Jan 12, 2005 at 10:42:48PM -0800, Yitzchak Scott-Thoennes wrote:
> $ cat child.c
> #include <stdio.h>
> int main(int argc, char **argv)
> {
> printf("[%s]\n", argv[1]);
> return 0;
> }
>
> $ cat parent.c
> #include <unistd.h>
> int main(int argc, char **argv) {
> char *args[] = { argv[1], "a\\\"b\\\"c", 0};
> execv( argv[1], args);
> return 1;
> }
>
> $ gcc -mno-cygwin -Wall parent.c -o nocygparent
> parent.c: In function `main':
> parent.c:4: warning: passing arg 2 of `execv' from incompatible pointer type
>
> $ gcc -Wall child.c -o cygchild
>
> $ ./nocygparent cygchild
> [a\b"c]
Can anybody else confirm this?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/