This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Logout Terminal Services RDC ends ssh invoked by W2k3 service


On Sep  8 14:03, Michael Brian Bentley wrote:
> 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.

That's not what I was talking about.  A hidden console window is
not the same as an invisible window station.  Broadly spoken, a
visible window station is the local or remote desktop which you
get when logging in interactively, an invisible window station is
what services are running in when the "Interact with desktop" flag
isn't set.

> 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.

As I understood your first mail, the general difference is that Cygwin
applications get finished, native applications survive.  That's why
I'm suspecting a specific piece of code in Cygwin to be responsible for
this behaviour.

> 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!

You could do me a favour and try the latest Cygwin snapshot 2005-Sep-08
from http://www.cygwin.com/snapshots/ It contains a patch which let
Cygwin application ignore the LOGOFF event entirely and let the default
mechanism deal with it.  I'd be interested if it changes the observed
behaviour.  That's plan B from my point of view.

Plan C would be to use setsid or nohup plus io-redirection when starting
Cygwin apps from the service.  The important fact here is that the
Cygwin process must be disconnected from its controlling tty (the console
which the service is running in).


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat, Inc.

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]