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: Please assist with details regarding uninstalling


Dan M wrote:

> A.  How do I tell what services I have installed?  (Basically I
> originally loaded everything, but then I uninstalled/re-installed
> picking just the default, so I believe I have the default).

Services are never automatically installed, only by action of the user
-- for example by running a script such as /usr/bin/cron-config.  So, if
you did not manually do this you probably do not have any services to
uninstall.

Nevertheless, the command "cygrunsrv -L" should give you a list of all
installed Cygwin services.  (Note that this -L functionality of
cygrunsrv did not exist at the time that the above FAQ entry was
written, otherwise it would have been mentioned there.)  If cygrunsrv -L
does not list anything, then you probably have nothing to stop or
remove.

Run "cygrunsrv --help" or "man cygrunsrv" for more information on using
the command.

> B.  How do I tell what services are currently running?  (I am running
> Windows XP Home.  Can the program manager tell me this?  If so, what
> specific names do I need to look for in the program manager?)

Use "cygrunsrv -Q name" to query the state of the service named "name". 
So for example if you installed the cron service, then running
"cygrunsrv -Q cron" might include a line that says "Current State:
Running".

You can also determine this by looking at the list of services in the
Windows control panel, but they will be hard to pick out of the long
list without some prior knowledge.

> B.  Please confirm:  "Remove all cygwin services" is the same as
> "uninstalling ...[each]... service from the registry".

Yes.  Although the details of how the service is removed is not
relevant, because cygrunsrv -R handles everything.  Perhaps the FAQ
should not mention the registry at all.

> C.  Are these commands simply typed into the command prompt screen?
> When I bring up the command prompt, a path comes up after the C drive
> name.  I get:
> 
> C:\Documents and Settings\Dan>
> 
> Do I need to change this at all or just type the commands after the ">"
> symbol?

You should probably type these from the Cygwin bash prompt/shell, not a
regular Windows command prompt, unless you have the cygwin directory
added to the Windows path.

> A.  How do I tell if any cygwin programs are running in the background?

Normally you would know this because you launched them in the background
yourself, e.g. by using "&" when starting them.  You can use the "ps"
command to list running processes, e.g. "ps aux".  Again, see the --help
output or manpage for more details.

> B.  After I have the answer to my question A, how do I terminate them
> (i.e., the Cygwin programs that are running in the background)?

There are a number of ways, but again the specifics depend on the
details of the programs and how they were launched.

For example if you launched a program with "&" then it will show up in
the output of "jobs" and you can use the %-sign notation to kill it,
e.g. "kill %1".  Or you can just kill them by PID.  And if you try to
exit from a login shell with background processes, the shell will warn
you.

That you are asking about this at all implies that none of this matters
in your case, because people that launch background processes tend to
know how to terminate them as well.  Most of this verbiage in the
uninstall procedure is there to account for possible things that a user
might have installed or might have running.  But if you haven't done any
of these things then it's a no-op.

> C.  How do I tell if any cygwin processes remain after entering the
> umount command?

What the FAQ entry is trying to express is that you should kill all
cygwin processes except for a single bash shell, then run umount from
that shell, then close the shell (by typing ^D or "exit").  It wouldn't
have made much sense if it said "kill all cygwin processes" and then
"run this umount command from a shell" because running the shell itself
is a cygwin process.  

Brian

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