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 Message-ID: <42E3E5EC.6070707@mscha.org> Date: Sun, 24 Jul 2005 21:03:08 +0200 From: Michael Schaap Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla Thunderbird 1.0+ (Windows/20050712) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Error using cygstart command with option arguments: "cygstart: bad argument" References: <20050723194252 DOT 38651 DOT qmail AT web30211 DOT mail DOT mud DOT yahoo DOT com> <42E2A76E DOT 5F686BC0 AT dessent DOT net> <42E2DA57 DOT 4000605 AT byu DOT net> In-Reply-To: <42E2DA57.4000605@byu.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 24-Jul-2005 2:01, Eric Blake wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > According to Brian Dessent on 7/23/2005 2:24 PM: > >>> $ cygstart bash -c echo Hi There >>> cygstart: bad argument -c: unknown option >>> >> The problem that you are running into is that you need to tell cygstart >> that the -c and following arguments are meant for the child process, and >> are not arguments to cygstart itself. '--' is a standard way of doing >> this, which indicates to the program that all of the following arguments >> should not be interpreted as switches but just regular data. So >> "cygstart -- bash -c ..." ought to work. >> > > Or you could patch cygstart to not permute arguments (by the way, cygutils > was hard to bootstrap from CVS. I had to run `gettextize -f', and now > have several CVS conflicts where generated files conflict with the results > of the gettextize and ./bootstrap): > > 2005-07-23 Eric Blake > > * src/cygstart/cygstart.c (main): Don't permute options. > > Index: src/cygstart/cygstart.c > =================================================================== > RCS file: /cvs/cygwin-apps/cygutils/src/cygstart/cygstart.c,v > retrieving revision 1.4 > diff -u -p -r1.4 cygstart.c > - --- src/cygstart/cygstart.c 16 May 2005 20:18:52 -0000 1.4 > +++ src/cygstart/cygstart.c 23 Jul 2005 23:56:48 -0000 > @@ -176,7 +176,8 @@ int main(int argc, const char **argv) > } > > /* Parse options */ > - - optCon = poptGetContext(NULL, argc, argv, opt, 0); > + optCon = poptGetContext(NULL, argc, argv, opt, > + POPT_CONTEXT_POSIXMEHARDER); > poptSetOtherOptionHelp(optCon, "[OPTION]... FILE [ARGUMENTS]"); > while ((rc = poptGetNextOpt(optCon)) > 0) { > switch (rc) { > This patch makes sense to me, so gets my blessing (FWIW :-) Chuck, can you apply this patch? Thanks, – Michael -- 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/