Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Feb 2020 02:12:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 244389] procstat(1) --libxo=xml produces invalid markup
Message-ID:  <bug-244389-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244389

            Bug ID: 244389
           Summary: procstat(1) --libxo=xml produces invalid markup
           Product: Base System
           Version: 12.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: tom@hur.st

-% procstat binary $$ --libxo=xml,pretty
<procstat version="1">
  <binary>
    <48700>
      <process_id>48700</process_id>
      <command>zsh</command>
      <osrel>1200086</osrel>
      <pathname>/usr/local/bin/rzsh</pathname>
    </48700>
  </binary>
</procstat>

Numeric tag names are not valid in XML:

malformed XML: missing tag start
Line: 10 Position: 225
Last 80 unconsumed characters:
<48700>       <process_id>48700</process_id>       <command>zsh</command>

Looks like this was reported in bug #213478 and closed as fixed, but it's
clearly not.

I'm not sure what libxo should do about this, perhaps just prefix the tag name
with an underscore, but arguably procstat(1) should follow ps(1) and make a
list of processes rather than opening a container for each one.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-244389-227>