* cygcheck.cc (scan_registry): Open registry with read-only access.
(main): Reflect argument change for dump_setup. * dump_setup.cc (dump_setup): Add preliminary extra argument for future use. * path.cc (read_mounts): Open registry with read-only access.
This commit is contained in:
parent
7d3480deef
commit
71f90de808
@ -1,3 +1,11 @@
|
|||||||
|
2001-11-11 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* cygcheck.cc (scan_registry): Open registry with read-only access.
|
||||||
|
(main): Reflect argument change for dump_setup.
|
||||||
|
* dump_setup.cc (dump_setup): Add preliminary extra argument for future
|
||||||
|
use.
|
||||||
|
* path.cc (read_mounts): Open registry with read-only access.
|
||||||
|
|
||||||
2001-11-11 Christopher Faylor <cgf@redhat.com>
|
2001-11-11 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* cygcheck.cc (main): Display package info when '-s' is specified.
|
* cygcheck.cc (main): Display package info when '-s' is specified.
|
||||||
|
@ -33,7 +33,7 @@ typedef long long longlong;
|
|||||||
typedef __int64 longlong;
|
typedef __int64 longlong;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void dump_setup (int, char **);
|
void dump_setup (int, char **, bool);
|
||||||
|
|
||||||
const char *known_env_vars[] = {
|
const char *known_env_vars[] = {
|
||||||
"c_include_path",
|
"c_include_path",
|
||||||
@ -739,7 +739,7 @@ scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygnus)
|
|||||||
ERROR_SUCCESS)
|
ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
HKEY sKey;
|
HKEY sKey;
|
||||||
if (RegOpenKeyEx (hKey, subkey_name, 0, KEY_ALL_ACCESS, &sKey)
|
if (RegOpenKeyEx (hKey, subkey_name, 0, KEY_READ, &sKey)
|
||||||
== ERROR_SUCCESS)
|
== ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
scan_registry (&ri, sKey, subkey_name, cygnus);
|
scan_registry (&ri, sKey, subkey_name, cygnus);
|
||||||
@ -1270,7 +1270,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
if (check_setup)
|
if (check_setup)
|
||||||
{
|
{
|
||||||
dump_setup (verbose, argv);
|
dump_setup (verbose, argv, true);
|
||||||
puts ("");
|
puts ("");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1285,13 +1285,13 @@ main (int argc, char **argv)
|
|||||||
dump_sysinfo ();
|
dump_sysinfo ();
|
||||||
if (!check_setup)
|
if (!check_setup)
|
||||||
{
|
{
|
||||||
dump_setup (verbose, NULL);
|
dump_setup (verbose, NULL, false);
|
||||||
puts ("");
|
puts ("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!givehelp)
|
if (!givehelp)
|
||||||
printf ("Use -h to see help about each section\n");
|
puts ("Use -h to see help about each section");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ match_argv (char **argv, const char *name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
dump_setup (int verbose, char **argv)
|
dump_setup (int verbose, char **argv, bool /*check_files*/)
|
||||||
{
|
{
|
||||||
char *setup = cygpath ("/etc/setup/installed.db", NULL);
|
char *setup = cygpath ("/etc/setup/installed.db", NULL);
|
||||||
FILE *fp = fopen (setup, "rt");
|
FILE *fp = fopen (setup, "rt");
|
||||||
|
@ -119,7 +119,7 @@ read_mounts ()
|
|||||||
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME);
|
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME);
|
||||||
|
|
||||||
HKEY key = issystem ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
|
HKEY key = issystem ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
|
||||||
if (RegCreateKeyEx (key, buf, 0, (LPTSTR) "Cygwin", 0, KEY_ALL_ACCESS,
|
if (RegCreateKeyEx (key, buf, 0, (LPTSTR) "Cygwin", 0, KEY_READ,
|
||||||
0, &key, &disposition) != ERROR_SUCCESS)
|
0, &key, &disposition) != ERROR_SUCCESS)
|
||||||
break;
|
break;
|
||||||
for (int i = 0; ;i++, m++)
|
for (int i = 0; ;i++, m++)
|
||||||
|
@ -9,6 +9,7 @@ specifically for Cygwin.</para>
|
|||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
Usage: cygcheck [-s] [-v] [-r] [-h] [program ...]
|
Usage: cygcheck [-s] [-v] [-r] [-h] [program ...]
|
||||||
|
-c = check current package setup
|
||||||
-s = system information
|
-s = system information
|
||||||
-v = verbose output (indented) (for -s or programs)
|
-v = verbose output (indented) (for -s or programs)
|
||||||
-r = registry search (requires -s)
|
-r = registry search (requires -s)
|
||||||
@ -27,6 +28,11 @@ option, it will give general system information. If you specify
|
|||||||
<literal>-s</literal> and list one or more programs on the command line,
|
<literal>-s</literal> and list one or more programs on the command line,
|
||||||
it reports on both.</para>
|
it reports on both.</para>
|
||||||
|
|
||||||
|
<para>The <literal>-c</literal> option causes the "program" arguments
|
||||||
|
to be interpreted as package names. <command>cygcheck</command> will
|
||||||
|
report the current version of the package that you specify. With no
|
||||||
|
arguments, <command>cygcheck</command> will report on all packages.
|
||||||
|
|
||||||
<para>The <command>cygcheck</command> program should be used to send
|
<para>The <command>cygcheck</command> program should be used to send
|
||||||
information about your system to Cygnus for troubleshooting (if your
|
information about your system to Cygnus for troubleshooting (if your
|
||||||
support representative requests it). When asked to run this command,
|
support representative requests it). When asked to run this command,
|
||||||
@ -120,7 +126,7 @@ done
|
|||||||
<sect2 id="kill"><title>kill</title>
|
<sect2 id="kill"><title>kill</title>
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
Usage: kill [-sigN] pid1 [pid2 ...]
|
Usage: kill [-f] [-sigN] pid1 [pid2 ...]
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
<para>The <command>kill</command> program allows you to send arbitrary
|
<para>The <command>kill</command> program allows you to send arbitrary
|
||||||
@ -130,20 +136,22 @@ also send program-specified signals such as SIGUSR1 to trigger actions
|
|||||||
within the program, like enabling debugging or re-opening log files.
|
within the program, like enabling debugging or re-opening log files.
|
||||||
Each program defines the signals they understand.</para>
|
Each program defines the signals they understand.</para>
|
||||||
|
|
||||||
<para>Note that the "pid" values are the Cygwin pids, not the Windows
|
<para>Note that, unless you specific the <literal>-f</literal> option,
|
||||||
pids. To get a list of running programs and their Cygwin pids, use
|
the "pid" values are the Cygwin pids, not the Windows pids. To get a
|
||||||
the Cygwin <command>ps</command> program.</para>
|
list of running programs and their Cygwin pids, use the Cygwin
|
||||||
|
<command>ps</command> program. <command>ps -W</command> will display
|
||||||
|
<emphasis>all</emphasis> windows pids.</para>
|
||||||
|
|
||||||
<para>To send a specific signal, use the
|
<para>To send a specific signal, use the <literal>-signN</literal>
|
||||||
<literal>-signN</literal> option, either
|
option, either with a signal number or a signal name (minus the "SIG"
|
||||||
with a signal number or a signal name (minus the "SIG" part), like
|
part), like these examples:</para>
|
||||||
these examples:</para>
|
|
||||||
|
|
||||||
<example><title>Specifying signals with the kill command</title>
|
<example><title>Using the kill command</title>
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>$</prompt> <userinput>kill 123</userinput>
|
<prompt>$</prompt> <userinput>kill 123</userinput>
|
||||||
<prompt>$</prompt> <userinput>kill -1 123</userinput>
|
<prompt>$</prompt> <userinput>kill -1 123</userinput>
|
||||||
<prompt>$</prompt> <userinput>kill -HUP 123</userinput>
|
<prompt>$</prompt> <userinput>kill -HUP 123</userinput>
|
||||||
|
<prompt>$</prompt> <userinput>kill -f 123</userinput>
|
||||||
</screen>
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user