On Sat, Jan 12, 2013 at 9:58 AM, Eduardo Morras <emorr...@yahoo.es> wrote:

> I thought that only in cgi mode it's forked for each request, I have to
> look that part of fossil code more deeply.  I think in server mode fossil
> could/should/may keep running without exit after each request.
>

It's the other way around - CGI mode does not fork (because the web server
launches one process per CGI request) but server mode is a thin shim around
CGI mode which simply answers connections and forks the children in CGI
mode. Fossil cannot really handle multiple requests from a single process
because fossil makes heavy use of global state, so concurrent requests
would all step on each other (e.g. the login info is held in global state).
The server process itself keeps running, but sits in an endless loop doing
select()/accept()/fork(), and does not touch the global repo state (that's
done by the children), but it does touch _some_ global state (e.g. the
http/sql tracing flags). i don't have the code handy here, but IIRC the
server's listener loop is implemented in cgi.c and the server command code
is in main.c.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to