delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/23/20:01:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: <42E2DA57.4000605@byu.net>
Date: Sat, 23 Jul 2005 18:01:27 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
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>
In-Reply-To: <42E2A76E.5F686BC0@dessent.net>
X-IsSubscribed: yes

-----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) {
- --
Life is short - so eat dessert first!

Eric Blake             ebb9 AT byu DOT net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC4tpW84KuGfSFAYARAj5kAKC8YqqHvlj4ydO4CRF8Pc4JHCFGtgCdEk3L
rujiGC5NDKB4OrQXNZ2f1G0=
=cM/r
-----END PGP SIGNATURE-----

--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019