Title: Error at on exit in TCC/LE
Type: behaviour Severity: normal
Components: None Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: otmarhumbel Nosy List: otmarhumbel, pjenvey, stuaxo, zyasoft
Priority: Keywords:

Created on 2010-09-30.23:16:52 by stuaxo, last changed 2010-10-10.10:31:20 by otmarhumbel.

File name Uploaded Description Edit Remove
1661patch.txt otmarhumbel, 2010-10-10.10:12:18 Patch for jython.bat
msg6113 (view) Author: stu (stuaxo) Date: 2010-09-30.23:16:51
Things almost work perfectly in TCC/LE, however it seems to set COMSPEC to C:\Program Files\JPSoft\TCCLE11\TCC.EXE

This causes an error on quit.

My preferred solution is to not use COMSPEC, just call exit /b:

Preferred solution:
--- jython.bat~ 2010-09-30 22:54:20.671875000 +0000
+++ jython.bat  2010-09-30 23:13:08.656250000 +0000
@@ -302,4 +302,4 @@

-%COMSPEC% /c exit /b %E%
+exit /b %E%

However if theres a reason to call it, then adding quotes will fix it in this case (but break it if you have quotes in the comspec):

- I've tested both and they work on my computer.

Non preferred solution:
--- jython.bat~ 2010-09-30 22:54:20.671875000 +0000
+++ jython.bat  2010-09-30 23:06:29.812500000 +0000
@@ -302,4 +302,4 @@

-%COMSPEC% /c exit /b %E%
+"%COMSPEC%" /c exit /b %E%
msg6119 (view) Author: Philip Jenvey (pjenvey) Date: 2010-10-03.00:06:11
We need COMSPEC (see #1352), removing it will cause failures in the regression test
msg6121 (view) Author: Jim Baker (zyasoft) Date: 2010-10-03.05:47:40
Looks like another issue that #1491 would help with. But that won't happen until 2.6 - it's too late for 2.5.2.
msg6141 (view) Author: Oti Humbel (otmarhumbel) Date: 2010-10-04.20:01:03
We could try to properly quote (first unquote, then quote) %COMSPEC%.
I hope I can give this a shot this week.
msg6162 (view) Author: Oti Humbel (otmarhumbel) Date: 2010-10-10.10:01:08
Here is a small test.bat which handles both quoted and unquoted %COMSPEC% variables:

"%_UNQUOTED_COMSPEC%" /c exit /b %E%

and then using it:

C:\test>set ComSpec=C:\Program Files (x86)\Copy of cmd\cmd.exe
C:\test>set _UNQUOTED_COMSPEC=C:\Program Files (x86)\Copy of cmd\cmd.exe
C:\test>"C:\Program Files (x86)\Copy of cmd\cmd.exe" /c exit /b

C:\test>set ComSpec="C:\Program Files (x86)\Copy of cmd\cmd.exe"
C:\test>set _UNQUOTED_COMSPEC=C:\Program Files (x86)\Copy of cmd\cmd.exe
C:\test>"C:\Program Files (x86)\Copy of cmd\cmd.exe" /c exit /b

I think this could solve the issue
msg6163 (view) Author: Oti Humbel (otmarhumbel) Date: 2010-10-10.10:12:18
Patch for jython.bat
msg6164 (view) Author: Oti Humbel (otmarhumbel) Date: 2010-10-10.10:31:20
fixed in revision 7142
Date User Action Args
2010-10-10 10:31:20otmarhumbelsetstatus: open -> closed
resolution: fixed
messages: + msg6164
2010-10-10 10:12:19otmarhumbelsetfiles: + 1661patch.txt
messages: + msg6163
2010-10-10 10:01:08otmarhumbelsetmessages: + msg6162
2010-10-04 20:01:04otmarhumbelsetassignee: otmarhumbel
messages: + msg6141
2010-10-03 05:47:41zyasoftsetnosy: + zyasoft
messages: + msg6121
2010-10-03 00:06:12pjenveysetnosy: + pjenvey, otmarhumbel
messages: + msg6119
2010-09-30 23:16:52stuaxocreate