Mail Archives: cygwin/2005/07/23/20:01:52
-----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 -