Leon Fischer <[email protected]> wrote:

> On the other hand, users could also bind it themselves in ~/.editrc and
> trigger pledge(2) violations in programs not designed for it.  It won't
> be obvious to them why their shiny feature wouldn't work.

Let me explain the future.

Pledge is now almost 6 years old, and it continues to print pledge
violation reports to dmesg.  I intended for those messages to be
temporary.  Eventually all the software should be correctly written,
and noone needs such reports.

If a program hits a weird situation, use ktrace or other debugging
methods to figure out what went wrong.  My idea is that pledge issues
should not be special.  Obviously it is a bit complicated to reason about
programs operating in different subsets of posix, but existing debugging
methods exist for that.

But if we go that way of hiding the messages, then we understand no
program should *EVER* reach a pledge violation, in any circumstance.
It is a bug in the program, or it is excessive pledging, or even pledge
is unsuitable to the program.

So if this library has a mechanism like this, and we find cause to
leave the supporting code intact, then an explicit initialization
request might satisfy the situation.

I do not want to become a libedit developer, so it is time to wait
for those people to speak.

Reply via email to