Ingo Schwarze <schwa...@usta.de> wrote: > Hi Kristaps, > > Kristaps Dzonsons BSD.LV wrote on Sat, Apr 07, 2018 at 01:37:32AM +0700: > > > The only reason I suggest a standalone section is that it's easier > > to standardise across manpages. > > For that goal, using ".Ss Pledge promises" > at the end of the DESCRIPTION might work. > > For now, such consistency would be local to the ksql package (and > maybe some related packages like kcgi?), and i don't anticipate a > large number of other non-base libraries that want to integrate > with pledge(2) in the near future. But even if some other libraries > pick it up from there, that wouldn't seem undesirable to me.
BTW, there is another approach: Describe what your function does properly. For instance, use terminology that a libc-level programmer will recognize as implying use of particular libc interfaces, which they can mentally maps back pledge concepts. (This reminds me of the warts in libc we got rid of -- to allow the creation of pledge. syslog() doesn't use sockets. DNS is a special socket, and regular sockets can't do DNS. isatty() is used extensively in libc, so it abstracted out to ensure ioctl is taken away. Various things like this were taken away inside libc, so that programmers don't need to be shocked "That operation seems so simple, why does it do something so complicated which I never expected?"