NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/38004: /bin/sh truncates a message for unobvious reasons
>Number: 38004
>Category: bin
>Synopsis: /bin/sh truncates a message for unobvious reasons
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Feb 12 08:20:02 +0000 2008
>Originator: YAMAMOTO Takashi <yamt%mwd.biglobe.ne.jp@localhost>
>Release: NetBSD 4.99.54
>Organization:
>Environment:
>Description:
when printing ps->cmd, commandtext() truncates it for
unobvious reasons.
>How-To-Repeat:
>Fix:
Index: jobs.c
===================================================================
RCS file: /cvsroot/src/bin/sh/jobs.c,v
retrieving revision 1.65
diff -u -p -r1.65 jobs.c
--- jobs.c 24 Apr 2006 19:00:29 -0000 1.65
+++ jobs.c 12 Feb 2008 08:06:25 -0000
@@ -1209,10 +1209,14 @@ commandtext(struct procstat *ps, union n
int len;
cmdnextc = ps->cmd;
+#if 1
+ len = sizeof(ps->cmd);
+#else
if (iflag || mflag || sizeof ps->cmd < 100)
len = sizeof(ps->cmd);
else
len = sizeof(ps->cmd) / 10;
+#endif
cmdnleft = len;
cmdtxt(n);
if (cmdnleft <= 0) {
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index