Hi Andrew,

Andrew Easton wrote on Fri, Jan 31, 2020 at 11:39:45AM +0100:

> In the spirit of not demanding to much time from my contemporaries I
> am especially greatful for pointers to conceptual documentation

This is the closest thing, i guess:

  https://www.openbsd.org/events.html

In general, to save time, the OpenBSD projects maintains only concise
reference documentation, not introductory documents or tutorials.

> and to implementation documentation.

For the kernel in general, see section 9 in man(1).

For userland programs, implementation documentation does not exist
in general, though there are are a few rare exceptions, see for
example the manual pages "For programmers:" listed
on https://mandoc.bsd.lv/ and some very rare text files scattered
around the source tree - but be careful, some of these can be
seriously outdated.

In general, our recommendation is RTFS (read the fantastic source
code).

Specifically, i'm not convinced that implementation documentation
exists for pledge(2) or unveil(2), but i may have missed something.

> [[ I have the suspicion that being a good programmer crucially depends
> on having conceptual understanding. Maybe it also depends on practice.]]

Many of us develop their conceptual understanding from reading source
code and from practice.

> Concretely:
> Just to start off easy, how can I find conceptual documentation on
> what an operating system "process" is in OpenBSD

While various details about how the kernel manages processes are no
doubt OS-specific, the conceptual ideas are probably more or less
common to all Unix implementations.  For the basics, standard text
books may be useful, as found on https://www.openbsd.org/books.html ,
for example Kirk's classic "Design and Implementation of the 4.4BSD
Operating System".

> and how deeply a libc
> is tied into that by design? As far as I am aware a process has the
> "current working directory" associated with it, in order to be able to
> resolve relative paths and is also where "environment variables" are
> stored.  These remind me of dynamic bindings, at least in spirit. I am
> only aware of plain C having lexical bindings, in contrast to this.

For such details, our recommendation generally is "read the source".

Start from the section 2 and 3 manual pages of the functions you
are interested in.  Then, if you need more details about how it's
implemented, read the libc code.  Then, if you need even more
details, read the code handling the syscalls in the kernel, of
those syscalls that are used in the libc implementation.

As opposed to the mess you are maybe used to from glibc, OpenBSD
code is generally very concise and readable.

Yours,
  Ingo

Reply via email to