Richard Hipp <drh@...> writes:

> 
> 
> On Fri, Jan 21, 2011 at 8:24 AM, Francisc Simon
<[email protected]> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> The only way, in Windows, that you can have a process started by a user
> continue running after logoff (i.e. what "nohup" does) is to start it
> either through a "scheduled task" or as a Windows service. When the user
> logs off all processes in their logon session will be killed.
> 
> 
> I don't need the process to continue running after the user logs off - I only
need it to keep running after the user closes the DOS box in which she had typed
"fossil server".   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.
> 
> :
> 
> D. Richard Hippdrh <at> sqlite.org
> 
>
I tried Dmitry Chestnykh's solution but i got some trouble, when the called
process does subsequent 'system(...)'-calls - new DOS-boxes are flickering
around.

Then i tried a simple 'start' in the command line for the existing
fossil_system. And i think, it should work.

The sub-process reuses the existing DOS box for outputs and the job is still
running after killing the fossil server. The sub process is killed, when the
DOS box for the original "fossil server" command is closed.

I simply added the following line to the "fossil server" command as a test:

---------------------------------
      mxPort = iPort+100;
    }
+ 
+ fossil_system("start  /b c:\\Programme\\unxtools\\yes");

  #if !defined(_WIN32)
    /* Unix implementation */
    if( isUiCmd ){
---------------------------------

The option /b activates the reusing of the existing DOS box for stdout.



_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to