Differences From:
File
src/cgi.c
part of check-in
[e2e016c31f]
- Get the "server" command running under windows.
by
drh on
2008-05-17 17:43:22.
[view]
To:
File
src/cgi.c
part of check-in
[dfb68976be]
- Add the "ui" command to automatically launch a web browser after
starting the HTTP server. The web browser choice can be configured
using the "setting" command.
by
drh on
2008-05-17 18:19:11.
[view]
@@ -1167,9 +1167,9 @@
**
** Return 0 to each child as it runs. If unable to establish a
** listening socket, return non-zero.
*/
-int cgi_http_server(int iPort){
+int cgi_http_server(int iPort, char *zBrowser){
#ifdef __MINGW32__
fprintf(stderr,"server not yet available in windows version of fossil\n");
exit(1);
#else
@@ -1199,8 +1199,11 @@
close(listener);
return 1;
}
listen(listener,10);
+ if( zBrowser ){
+ system(zBrowser);
+ }
while( 1 ){
if( nchildren>MAX_PARALLEL ){
/* Slow down if connections are arriving too fast */
sleep( nchildren-MAX_PARALLEL );