aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorGravatar Eric Andersen <andersen@codepoet.org>2000-06-02 03:21:42 +0000
committerGravatar Eric Andersen <andersen@codepoet.org>2000-06-02 03:21:42 +0000
commit86ab8a32bd63b2f2a73bdcead8e2bb037589e175 (patch)
tree10aa90962757d07724c78e4fc9baaa27ca7b4858 /procps
parent4062268bc7ac748e2ea2e569aa862b2b3f8a2db2 (diff)
downloadbusybox-86ab8a32bd63b2f2a73bdcead8e2bb037589e175.tar.gz
busybox-86ab8a32bd63b2f2a73bdcead8e2bb037589e175.tar.bz2
A number of additional fixed from Pavel Roskin, note some more bugs in the
TODO list. Add Glenn to the Authors list for writing a mini ar for BusyBox, which is now included. -Erik
Diffstat (limited to 'procps')
-rw-r--r--procps/kill.c3
-rw-r--r--procps/ps.c13
2 files changed, 11 insertions, 5 deletions
diff --git a/procps/kill.c b/procps/kill.c
index 0487f6a66..1f1bee48b 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -234,6 +234,9 @@ extern int kill_main(int argc, char **argv)
pid_t* pidList;
pidList = findPidByName( *argv);
+ if (!pidList)
+ errorMsg( "%s: no process killed\n", *argv);
+
for(; pidList && *pidList!=0; pidList++) {
if (*pidList==myPid)
continue;
diff --git a/procps/ps.c b/procps/ps.c
index 0842a22c2..41b8465bd 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -40,6 +40,9 @@
#define bb_need_help
#include "messages.c"
+#define TERMINAL_WIDTH 79 /* not 80 in case terminal has linefold bug */
+
+
#if ! defined BB_FEATURE_USE_DEVPS_PATCH
@@ -124,9 +127,9 @@ extern int ps_main(int argc, char **argv)
int len, i, c;
#ifdef BB_FEATURE_AUTOWIDTH
struct winsize win = { 0, 0 };
- int terminal_width = 0;
+ int terminal_width = TERMINAL_WIDTH;
#else
-#define terminal_width 79
+#define terminal_width TERMINAL_WIDTH
#endif
@@ -142,7 +145,7 @@ extern int ps_main(int argc, char **argv)
dir = opendir("/proc");
if (!dir)
- fatalError("Can't open /proc");
+ fatalError("Can't open /proc\n");
#ifdef BB_FEATURE_AUTOWIDTH
ioctl(fileno(stdout), TIOCGWINSZ, &win);
@@ -214,9 +217,9 @@ extern int ps_main(int argc, char **argv)
char groupName[10] = "";
#ifdef BB_FEATURE_AUTOWIDTH
struct winsize win = { 0, 0 };
- int terminal_width = 0;
+ int terminal_width = TERMINAL_WIDTH;
#else
-#define terminal_width 79
+#define terminal_width TERMINAL_WIDTH
#endif
if (argc > 1 && **(argv + 1) == '-')