Logout Terminal Services RDC ends ssh invoked by W2k3 service

Michael Brian Bentley bentley@crenelle.com
Thu Sep 8 21:23:00 GMT 2005


The developer who wrote the relevant code writes:

The terminal window that ssh is running inside of is not visible.
si.wShowWindow = SW_HIDE; is used to accomplish this in the
CreateProcess.

si.cb           = sizeof(STARTUPINFO);
si.dwFlags      = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
si.hStdOutput   = hChildStdOut;
si.hStdInput    = hChildStdIn;
si.hStdError    = hChildStdErr;

// Use this if you want to hide the child:

si.wShowWindow = SW_HIDE;

// Note that dwFlags must include STARTF_USESHOWWINDOW if you want to
// use the wShowWindow flags.

pData->env_block = process_env_block(pData, StringAt(pData, environment));

// Launch the process that you want to redirect (in this case,
// Child.exe). Make sure Child.exe is in the same directory as
// redirect.c launch redirect from a command line to prevent location
// confusion.

if 
(!CreateProcess(NULL,command,NULL,NULL,TRUE,CREATE_NEW_CONSOLE|HIGH_PRIORITY_CLASS,
                    pData->env_block,wkgdir,&si,&pi)){

----------------

We did do the test. The mileage varies depending on the program we 
run. The important one, ssh, appears to finish right away. Others 
appear to continue to operate, but running them via Terminal Services 
likely will end execution after logout.

The feeling we have now is to go to plan B and find an alternative 
solution until we can solve the problem. Thanks very much!


-Mike

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list