Why not use threads? 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." 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

