<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - systemd-cgls shows 'n/a' for when piping output less or more"
href="https://bugs.freedesktop.org/show_bug.cgi?id=56644#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - systemd-cgls shows 'n/a' for when piping output less or more"
href="https://bugs.freedesktop.org/show_bug.cgi?id=56644">bug 56644</a>
from <span class="vcard"><a class="email" href="mailto:Anders.Olofsson@axis.com" title="Anders Olofsson <Anders.Olofsson@axis.com>"> <span class="fn">Anders Olofsson</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=69696" name="attach_69696" title="Patch to handle failed columns detection.">attachment 69696</a> <a href="attachment.cgi?id=69696&action=edit" title="Patch to handle failed columns detection.">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=56644&attachment=69696'>[review]</a>
Patch to handle failed columns detection.
This looks like the same problem I'm having. I have attached a patch that
solves it for me.
The problem is that terminal width detection fails (fd_columns() in
src/shared/util.c) but the calling function (columns() in src/shared/util.c)
doesn't handle signed values and returns 4294967273 as the number of columns.
When the fault column number is passed along to get_process_cmdline() (in
src/shared/util.c) it fails to allocate memory for a string that wide resulting
in a null pointer that is printed as "n/a".
Fault exists in version 195 but not in 194.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>