* kill.cc (main): Set exit value to 1 on invalid pid. Perform minor cleanup.
This commit is contained in:
parent
c27a29813a
commit
12f6d7bc9c
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Oct 7 23:06:39 2001 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* kill.cc (main): Set exit value to 1 on invalid pid. Perform minor
|
||||||
|
cleanup.
|
||||||
|
|
||||||
Fri Sep 21 20:40:30 2001 Christopher Faylor <cgf@cygnus.com>
|
Fri Sep 21 20:40:30 2001 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
* Makefile.in (mingw_getopt.o): Ensure that newlib include directories
|
* Makefile.in (mingw_getopt.o): Ensure that newlib include directories
|
||||||
|
|
|
@ -61,30 +61,23 @@ sig0:
|
||||||
char *p;
|
char *p;
|
||||||
int pid = strtol (*argv, &p, 10);
|
int pid = strtol (*argv, &p, 10);
|
||||||
if (*p != '\0')
|
if (*p != '\0')
|
||||||
fprintf (stderr, "kill: illegal pid: %s\n", *argv);
|
{
|
||||||
|
fprintf (stderr, "kill: illegal pid: %s\n", *argv);
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
else if (kill (pid, sig) == 0)
|
||||||
|
{
|
||||||
|
if (force)
|
||||||
|
forcekill (pid, sig, 1);
|
||||||
|
}
|
||||||
|
else if (force && sig != 0)
|
||||||
|
forcekill (pid, sig, 0);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if 0
|
char buf[1000];
|
||||||
printf ("Sending %s(%d) signal to pid %d\n",
|
sprintf (buf, "kill %d", pid);
|
||||||
strsignal (sig), sig, pid);
|
perror (buf);
|
||||||
#endif
|
ret = 1;
|
||||||
if (kill (pid, sig) == 0)
|
|
||||||
{
|
|
||||||
if (force)
|
|
||||||
forcekill (pid, sig, 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (force && sig != 0)
|
|
||||||
forcekill (pid, sig, 0);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
char buf[1000];
|
|
||||||
sprintf (buf, "kill %d", pid);
|
|
||||||
perror (buf);
|
|
||||||
ret = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
argv++;
|
argv++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -344,6 +344,7 @@ Usage mount
|
||||||
|
|
||||||
-b = text files are equivalent to binary files (newline = \n)
|
-b = text files are equivalent to binary files (newline = \n)
|
||||||
-x = files in the mounted directory are automatically given execute permission.
|
-x = files in the mounted directory are automatically given execute permission.
|
||||||
|
-X = files in the mounted directory are automatically given execute permission and are assumed to be Cygwin (i.e., not generic windows) executables only.
|
||||||
-f = force mount, don't warn about missing mount point directories
|
-f = force mount, don't warn about missing mount point directories
|
||||||
-s = add mount point to system-wide registry location
|
-s = add mount point to system-wide registry location
|
||||||
--change-automount-prefix = change path prefix used for automatic mount points
|
--change-automount-prefix = change path prefix used for automatic mount points
|
||||||
|
|
Loading…
Reference in New Issue