Bug 190174 - ps truncates command-line when length is 2047 characters
ps truncates command-line when length is 2047 characters
Status: CLOSED DUPLICATE of bug 198140
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: procps (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-28 10:40 EDT by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-08 16:38:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2006-04-28 10:40:38 EDT
+++ This bug was initially created as a clone of Bug #134516 +++

-- Additional comment from bnocera@redhat.com on 2006-04-28 10:38 EST --
The problem still exists when the command-line is exactly 2047 characters
because of an off-by-one error in the procps-2.0.17-longcmd.patch patch.

in readproc.c:
        /* read whole file into a memory buffer, allocating as we go */
       while ((n = read(fd, buf, sizeof buf - 1)) > 0) {
               if (n < BUF_LEN)
                       end_of_file = 1;

BUF_LEN is *always* greater than n, as BUF_LEN is 2048, and we read up to 2048-1
characters.
Comment 2 Karel Zak 2006-04-28 11:29:11 EDT
See bug #134516. Note there is not procps-2.0.17-longcmd.patch patch.in RHEL4
(the problem has been fixed by upstream).
Comment 5 Karel Zak 2007-01-08 16:38:26 EST

*** This bug has been marked as a duplicate of 198140 ***

Note You need to log in before you can comment on or make changes to this bug.