Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 29 Dec 2022 18:44:47 +0100
From: Steffen Nurpmeso <steffen@...oden.eu>
To: oss-security@...ts.openwall.com
Subject: Re: [patch] proc.5: tell how to parse
 /proc/*/stat correctly

Alan Coopersmith wrote in
 <b31213da-5ea2-d1f8-dcb2-2917b787ce89@...cle.com>:
 |On 12/28/22 08:47, Demi Marie Obenour wrote:
 |> A binary format would be even better.  No risk of ambiguity.
 |
 |That is how the Solaris (and now illumos) /proc has always worked - fewer
 |parsing problems, but you need to use tools to handle the contents, not
 |just cat/less/etc.
 |
 |https://docs.oracle.com/cd/E88353_01/html/E37852/proc-5.html

I personally find it highly beneficial to grasp informations meant
for human consumption with UNIX text tools.
..And still blinded by Pike's "just make it a string".

If you have an FS="\0" compatible awk(1) (not nawk, not busybox
awk (yet)) it is very easy to parse such text files.

P.S.: CBOR .. if you want JSON.  (The NetBSD folks got that long
before it was hip, where i saw it first.)

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.