Mail Archives: cygwin/2005/07/24/15:03:27
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 <ebb9 AT byu DOT net>
>
> * 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/
- Raw text -