public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: batch script execution failing with 255 exit code in cygwin 1.7.28
@ 2014-03-21  0:37 Weber, Mark
  0 siblings, 0 replies; 10+ messages in thread
From: Weber, Mark @ 2014-03-21  0:37 UTC (permalink / raw)
  To: cygwin

I am also having some trouble with the latest version of Cygwin, which includes 
this patch.

See
http://cygwin.com/ml/cygwin-patches/2014-q1/msg00017.html
for example.


I am having a related issue, with C++ code that parses the command line.

The command line we support is something like -
  program_name   arg1  -option1=val1  -option2=val2  ...

You get the idea.

Now, with the above mentioned Cygwin patch, we are seeing the input arguments

arg1  "-option1=val1"   "-option2=val2"  ...

If this were the extent of the issue, it would be no big deal to 
strip off the quotes. However, the user may have put quotes on the 
command line himself, which Cygwin now moves around.
Such as:
  program_name  arg1  -option1="file name with spaces in it"

With the patch, is there any way to reliably tell what the user entered 
on the command line?



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread
* batch script execution failing with 255 exit code in cygwin 1.7.28
@ 2014-02-14  7:05 Prakash Babu
  2014-02-14  8:58 ` Andrey Repin
  2014-02-14 15:28 ` Christopher Faylor
  0 siblings, 2 replies; 10+ messages in thread
From: Prakash Babu @ 2014-02-14  7:05 UTC (permalink / raw)
  To: cygwin

Hi ,


I use Cygwin to execute batch scripts on remote windows hosts using ssh.

The batch script execution started failing with the latest cygwin
version 1.7.28.

The exit code thrown is 255 and batch script is not able to process
the command line arguments.

When I try to print the command line argument(%1)  its printing both
the argument name and value.

This was working fine with Cygwin 1.7.27 and  looks to be regression in 1.7.28


eg. Batch script (test.bat)
@echo off
:setArgs
if ""%1""=="""" goto doneSetArgs
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
echo %1===
echo %2===
shift
shift
goto setArgs
:doneSetArgs


Cygwin.1.7.27 the output of the script would be
#./test.bat OS=Win
OS===
Win===

Cygwin.1.7.28 the output of the script is
#./test.bat OS=Win
"OS=Win"===
===


Is this a known issue ?
Where can I download Cygwin 1.7.27  until I find a workaround/fix to
this issue ?

thanks,
Prakash

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-03-20 22:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-21  0:37 batch script execution failing with 255 exit code in cygwin 1.7.28 Weber, Mark
  -- strict thread matches above, loose matches on Subject: below --
2014-02-14  7:05 Prakash Babu
2014-02-14  8:58 ` Andrey Repin
2014-02-14 15:28 ` Christopher Faylor
2014-02-17  3:35   ` Prakash Babu
2014-02-17  3:56     ` Christopher Faylor
2014-02-17  4:46       ` Christopher Faylor
2014-02-17  5:50         ` Prakash Babu
2014-02-17 13:14           ` Andrey Repin
2014-02-17 14:53           ` Chris J. Breisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).