The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: George Michaelson <ggm@algebras.org>
To: The Eunuchs Hysterical Society <TUHS@tuhs.org>
Subject: Re: [TUHS] 4.1c bsd ptrace man entry ("ptrace is unique and arcane")
Date: Wed, 26 Jun 2019 11:12:49 +1000	[thread overview]
Message-ID: <CAKr6gn2BDqkSuHeBmUMkmKUpX9N+2C6D7L+xRr1suS5vJQ8V9A@mail.gmail.com> (raw)
In-Reply-To: <CAP6exYKFkDYYYNbkhUxC1x4kSf0w-TJvy0L7udcoP4btSmBGxQ@mail.gmail.com>

The lack of consistency in what you can READ in /proc makes it hard to
believe its useful in the "wide" -but I am sure specific things get
benefit from it, as an abstraction which makes code simple because
"its a file"

if you're WRITING into things in /proc, I think you own the pain be it
an ioctl() or anything else.

I see occasional shell scripts about turning on and off meta-state for
SCSI or SAS as "cat 0 >
/dev/somedir/some-model-of-abstraction/some-disk" and while I applaud,
I also wince. So easy to go wrong..

As a long-term user and non-developer, I'm sort of half a believer,
half not. Maybe if it had emerged before the great Schism(s) it would
be more normal? sane? understandable?

-G

On Wed, Jun 26, 2019 at 11:04 AM ron minnich <rminnich@gmail.com> wrote:
>
> On Tue, Jun 25, 2019 at 5:46 PM Larry McVoy <lm@mcvoy.com> wrote:
> >
> > I'm curious what Rob and others think of the Linux /proc.  It's string
> > based and it seems like it is more like /whatever_you_might_want.
>
> it's very handy but quite difficult to work with programatically. The
> output is convenient for humans to parse, not very nice for programs
> to parse.
>
> /proc on linux has no real standard way of outputting things. You get
> tables, tuples, and lists and some stuff I can't classify
> (/proc/execdomains, /proc/devices); and, in some cases, some files
> give you more than one type of thing. Units are not clear for many
> tables.
>
> /proc on linux has far more than just process information, including
> stuff that has nothing to do with processes (51 things on my current
> linux, e.g. /proc/mounts).
>
> Things are in many cases not self-describing, though lots of /proc
> have this issue.
>
> I do recall (possibly wrongly) at some point in the 2000s there was an
> effort to stop putting stuff in /proc, but rather in /sys, but that
> seems to have not worked out. /proc is just too convenient a place,
> and by convention, lots of stuff lands there.
>
> While I was at LANL we did experiment with having /proc come out as
> s-expressions, which were nicely self describing, composable, easily
> parsed and operated on, and almost universally disliked b/c humans
> don't read s-expressions that easily. So that ended.
>
> We've been reimplementing Unix commands in Go for about 8 years now
> and dealing with all the variance in /proc on linux was a headache.
> You pretty much need a different function for every file in /proc.
>
> And all that said, it's handy, so hard to complain about too much.

  reply	other threads:[~2019-06-26  1:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 19:33 Norman Wilson
2019-06-25 19:42 ` Bakul Shah
2019-06-25 20:35 ` Clem Cole
2019-06-25 23:52 ` ron minnich
2019-06-26  0:37   ` Rob Pike
2019-06-26  0:46     ` Larry McVoy
2019-06-26  0:56       ` Rob Pike
2019-06-26  1:03       ` ron minnich
2019-06-26  1:12         ` George Michaelson [this message]
2019-06-26  1:32           ` Noel Hunt
2019-06-26 15:41         ` Theodore Ts'o
  -- strict thread matches above, loose matches on Subject: below --
2019-06-25  2:27 Kirk McKusick
2019-06-25  1:08 ron minnich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKr6gn2BDqkSuHeBmUMkmKUpX9N+2C6D7L+xRr1suS5vJQ8V9A@mail.gmail.com \
    --to=ggm@algebras.org \
    --cc=TUHS@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).