* 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>
|
||||
|
||||
* Makefile.in (mingw_getopt.o): Ensure that newlib include directories
|
||||
|
|
|
@ -61,30 +61,23 @@ sig0:
|
|||
char *p;
|
||||
int pid = strtol (*argv, &p, 10);
|
||||
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
|
||||
{
|
||||
#if 0
|
||||
printf ("Sending %s(%d) signal to pid %d\n",
|
||||
strsignal (sig), sig, pid);
|
||||
#endif
|
||||
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;
|
||||
}
|
||||
}
|
||||
char buf[1000];
|
||||
sprintf (buf, "kill %d", pid);
|
||||
perror (buf);
|
||||
ret = 1;
|
||||
}
|
||||
argv++;
|
||||
}
|
||||
|
|
|
@ -344,6 +344,7 @@ Usage mount
|
|||
|
||||
-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 and are assumed to be Cygwin (i.e., not generic windows) executables only.
|
||||
-f = force mount, don't warn about missing mount point directories
|
||||
-s = add mount point to system-wide registry location
|
||||
--change-automount-prefix = change path prefix used for automatic mount points
|
||||
|
|
Loading…
Reference in New Issue