Ticket UUID: | ce73fc217320601b9c8ba2c94507e25e82879edc | ||
Title: | ui doesn't work on Windows 9x (portable_system() broken) | ||
Status: | Open | Type: | Code_Defect |
Severity: | Minor | Priority: | |
Subsystem: | Resolution: | ||
Last Modified: | 2010-03-17 10:53:52 | ||
Version Found In: | [599e6abfb1] 2010-03-08 | ||
Description & Comments: | |||
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.) 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: %COMSPEC% /c ="fossil" http "foo" %COMSPEC% /c ="fossil" http foo %COMSPEC% /c =fossil http "foo" %COMSPEC% /c =start http://127.0.0.1/ 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 ( |