Overview
Artifact ID: | 4237905097aa8154622b0ce1fde2cb6f1f4da55a |
---|---|
Ticket: | ce73fc217320601b9c8ba2c94507e25e82879edc
ui doesn't work on Windows 9x (portable_system() broken) |
User & Date: | anonymous 2010-03-17 10:53:52 |
Changes
- comment changed to:
On Windows 9x I get "Invalid command or file name" when issuing "fossil ui" command and each time browser sends a request to a fossil server. The problem is in portable_system() -- 9x doesn't like a hack with double quotes around a command string. Since system(string) function on Windows is implemented as %COMSPEC% /c string, on 9x we get: %COMSPEC% /c ""fossil" http "foo"", which does not work, instead of normal: %COMSPEC% /c "fossil" http "foo", which doesn't work on NT etc. A hack using double quotes around entire command string on Windows NT (2000, XP etc.) [http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cmd.mspx?mfr=true|is documented] and works because cmd.exe strips the first and the last quote if a command starts with a quote. So there exists another dirty (and IIRC undocumented) hack. We could start command string with something that both cmd.exe and command.com ignore: <pre>%COMSPEC% /c ="fossil" http "foo" %COMSPEC% /c ="fossil" http foo %COMSPEC% /c =fossil http "foo" %COMSPEC% /c =start http://127.0.0.1/</pre> Commands above work just fine both in 9x and NT (up to Windows 7) as long as internal commands like echo or start are NOT quoted (<code>="start" http://127.0.0.1/</code> doesn't work nor <code>"start" http://127.0.0.1/</code> does). So, maybe <code>mprintf("=%s", zOrigCmd)</code> would be better? Any other ideas? And yes, I know, that it is 2010 now and 98 must be already dead… :-)
- foundin changed to: "[599e6abfb1] 2010-03-08"
- private_contact changed to: "85642192e67e1e669fd6547f4b92074c6e91c71e"
- severity changed to: "Minor"
- status changed to: "Open"
- title changed to:
ui doesn't work on Windows 9x (portable_system() broken)
- type changed to: "Code_Defect"