Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 13 Jan 2005 12:44:24 -0800 From: Yitzchak Scott-Thoennes To: cygwin AT cygwin DOT com Subject: Re: cygwin programs called from non-cygwin programs mauling \" in args Message-ID: <20050113204424.GD3880@efn.org> References: <20050113064248 DOT GA2416 AT efn DOT org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050113064248.GA2416@efn.org> User-Agent: Mutt/1.4.1i Organization: bs"d X-IsSubscribed: yes On Wed, Jan 12, 2005 at 10:42:48PM -0800, Yitzchak Scott-Thoennes wrote: > Given a simple child process that prints its argument, and a parent > that execs it passing a\"b\"c, trying combinations of cygwin and non- > cygwin parent and child shows inconsistency in what's received: > > $ cat child.c > #include > int main(int argc, char **argv) > { > printf("[%s]\n", argv[1]); > return 0; > } > > $ cat parent.c > #include > int main(int argc, char **argv) { > char *args[] = { argv[1], "a\\\"b\\\"c", 0}; > execv( argv[1], args); > return 1; > } > > $ gcc -mno-cygwin -Wall child.c -o nocygchild > > $ 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 Incidentally, that warning is due to mingw having a non-compliant prototype. -- 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/