Fossil

View Ticket
Login

View Ticket

2023-01-17
15:37 Closed ticket [ce73fc2173]: ui doesn't work on Windows 9x (portable_system() broken) plus 3 other changes ... (artifact: e80be03eaa user: stephan)
2012-09-17
07:34
fix [ce73fc2173] <p>Restore Win9x, using unicows eliminate all #ifdef UNICODE ... (Closed-Leaf check-in: 9cf5056af9 user: jan.nijtmans tags: win95-unicows)
2012-09-12
14:42
fix [ce73fc2173] as well ... (check-in: ed5695fe7f user: jan.nijtmans tags: restore-win95)
2010-03-17
10:53 New ticket [ce73fc2173] ui doesn't work on Windows 9x (portable_system() broken). ... (artifact: 4237905097 user: anonymous)

Ticket Hash: ce73fc217320601b9c8ba2c94507e25e82879edc
Title: ui doesn't work on Windows 9x (portable_system() broken)
Status: Closed Type: Code_Defect
Severity: Minor Priority:
Subsystem: Resolution: Wont_Fix
Last Modified: 2023-01-17 15:37:16
Version Found In: [599e6abfb1] 2010-03-08
Description:
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 (="start" http://127.0.0.1/ doesn't work nor "start" http://127.0.0.1/ does). So, maybe mprintf("=%s", zOrigCmd) would be better? Any other ideas? And yes, I know, that it is 2010 now and 98 must be already dead… :-)