On Fri, Jan 21, 2011 at 10:23 AM, Ron Wilson <[email protected]> wrote:
> Why not use threads? Perhaps you said this because you are aware of my opinion of threads and you just wanted to push my buttons? Ha! I'm on to your ruse and it won't work! > Multi-threaded processes are supported on both > Windows and POSIX. > > Also, it is poosible to catch the Control-C signal in your process so > you can wait until in-progress operations are complete before > terminating the process. Your Control-C handler should output a > message (to STDERR) like "Shutdown waiting for in-progress operations > to complete." > In the case of CGI, the background process may need to wait until one or more additional messages are received by subsequent client messages. But the client won't send any more messages until the current CGI returns. And the current CGI can't return until the background thread completes. So you are deadlocked. > > On Fri, Jan 21, 2011 at 8:44 AM, Richard Hipp <[email protected]> wrote: > > Actually, it would even be OK to kill the > > process when the DOS box is closed, as long as the process continues > running > > after the user presses Ctrl-C to shut down the "fossil server" command. > > I suppose the most important thing is that I need the background process > to > > continue running after the parent process (which will usually be the CGI > on > > the server side of a push/pull) returns its output to the webserver > and/or > > user and terminates. > > A push/pull typically involves multiple round-trips between client and > > server. The background process is needed so that we can wait until the > > entire push/pull operation completes before invoking the hooks. The > > background process is also needed so that a long-running hook does not > delay > > the server from responding to the client. > _______________________________________________ > fossil-users mailing list > [email protected] > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- D. Richard Hipp [email protected]
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

