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: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.33-0.1


On Oct 28 08:58, Eric Blake wrote:
> On 10/28/2014 08:20 AM, Corinna Vinschen wrote:
> >>> Now that you mention it... yes, a service dependency might be helpful.
> >>> Unfortunately it's tricky to automate this.  Is it possible to add
> >>> service deps after having installed a service?
> >>
> >> According to
> >> http://serverfault.com/questions/24821/how-to-add-dependency-on-a-windows-service-after-the-service-is-installed
> >> it is possible to add a dependency to an already existing service.  I
> >> agree it would be hard to automate in the install scripts, as one
> >> would have to either ask the user about their intent to run other
> >> services or rely that they configured cygserver first and then check
> >> to see if it has been already configured to determine if a dependency
> >> should be created.  I would think that some instructions in the docs
> >> near the statement mentioned above would be more than sufficient,
> >> since this is a "fine tuning" sort of thing.
> > 
> > Agreed.  Do you have some idea how to phrase this?  I'd be grateful
> > for a nice two or three paragraphs discussing this.
> 
> On Linux, systemd has a notion of soft dependencies, where any service
> can do a one-sided advertisement that "if this other service is also
> installed, then here is the order that must be observed between bringing
> the two services up; but there is no requirement that the other service
> be installed".  Note in particular that both 'before' and 'after' soft
> dependencies can be specified.  I wonder if cygserver could be taught to
> do something similar - but it would probably be a lot of work.

There's a twist here.  The activity, whether or not to ask cygserver, is
not controlled by cygserver.  The decision is made in the first process
of a Cygwin process tree, and then if any other process fails to contact
cygserver,

One idea to workaround would be to check for Session 0, the session
in which the service processes run.  If a process fails to contact
cygserver, it checks if it's running in session 0.  If so, it will
try to contact cygserver again later.

Potential downside: This might slowdown account handling again, but
AFAIK, trying to open a non-existing named pipe (used to communicate
between process and cygserver) is blazingly fast.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgp1L1074ogbG.pgp
Description: PGP signature


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