Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Openbsd went with a stringly typed system for their pledge api.

I think it was for simplicity of use. But i find it a very strange interface from a bunch of C programmers.

https://man.openbsd.org/pledge

update: Found the commit message

    Move to next tame() API.  The flags are now passed as a very simple string,
    which results in tame() code placements being much more recognizeable.
    tame() can be moved to unistd.h and does not need cpp symbols to turn the
    bits on and off.  The resulting API is a bit unexpected, but simplifies the
    mapping to enabling bits in the kernel substantially.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: