Re: procfs problems

david parsons (o.r.c@p.e.l.l.c.h.i.i.l.u.s)
17 Apr 1997 00:51:34 -0700

In article <>,
Stefan Monnier <monnier+/news/lists/linux/kernel@TEQUILA.SYSTEMSZ.CS.YALE.EDU> wrote:
>o.r.c@p.e.l.l.c.h.i.i.l.u.s (david parsons) writes:
>> can be used even when /usr/bin has gone south for the winter. One of
>> the lessons of Windows NT is that even though a binary registry can
>> be nice for writing simple-minded gui tools, it's a real bitch when
>> something gets corrupted. Human readable text, on the other hand, is
>> amenable to deal with when your display tool is toast.
>I don't knwo about you, but I don't consider your sh-script as a human.
>I could do the exact same script with a binary format /proc if we could put
>something more than just sh in /bin.

What about the pathological case of an install floppy, where you've
got space constraints?

>Oh well, I know that Unix is the reign of text and strings, so I'm not going
>to change that in this list. Go ahead with your strings everywhere and we'll
>just keep on parsing/unparsing/parsing/unparsing/...

Is this a critical path where the extra cycles are blocking
functionality? If not, why bother changing the parsing scheme from
parsing text to parsing arbitrary binaries? It's as easy, if not
easier, to write tools that will take as input well-behaved text (if a
human does not generate this text, this is almost a given) and produce
arbitrary output as it is to write tools that take as input
well-behaved binary data and produce arbitrary output. Plus you get
the benefits of a human-readable interface without carrying around a
lot of external tools, at the cost of locking yourself into a
language (which, compared to the cost of locking yourself into
binary data blocks doesn't seem quite so horrible) and a bit of
stringspace in the kernel.

(Of course this only applies when both the interface and the tools
that read it are well-behaved. Arp -a is a notable case of this; when
I was forced to upgrade my server to 2.0.28, arp -a just stopped
working, despite reading /proc/net/arp for the arp list.)

david parsons \bi/