Message-Id: <200501200310.j0K3AwKT020441@delorie.com> 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 From: "Gary R. Van Sickle" To: Subject: RE: cygwin programs called from non-cygwin programs mauling \" in args Date: Wed, 19 Jan 2005 21:08:13 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <20050119233410.GA2888@efn.org> X-IsSubscribed: yes > -----Original Message----- > From: cygwin-owner AT cygwin DOT com > [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of Yitzchak Scott-Thoennes > Sent: Wednesday, January 19, 2005 5:34 PM > To: cygwin AT cygwin DOT com > Subject: Re: cygwin programs called from non-cygwin programs > mauling \" in args > > On Wed, Jan 12, 2005 at 10:42:48PM -0800, Yitzchak > Scott-Thoennes wrote: > > $ 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 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? > Lessee.... ...sorta. I get: " $ ./nocygparent cygchild ~ $ [a\b"c] " And then it sits there waiting for input. When I hit enter it quits and brings me back to the prompt. This is with snapshot 20050116 and gcc (GCC) 3.4.1 (cygming special). What happens if you correct the warning? -- Gary R. Van Sickle -- 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/