On Mon, Nov 30, 2015 at 02:26:38PM +0100, Jan Stary wrote: > On Nov 30 14:16:02, [email protected] wrote: > > On Nov 23 13:17:43, [email protected] wrote: > > > Declared usage() as __dead since it won't return, instructions() called > > > a handrolled pager (/bin/cat) using fork which I replaced for a simple > > > cicle of while(fgets) then fputs (greatly inspired, to not saying it was > > > bluntly copied, by a previous patch sent by tedu@ for another > > > application). > > > After instructions() function is run then fish(6) only needs pledge > > > "stdio". > > > > On Nov 30 01:42:03, [email protected] wrote: > > > slightly interesting pledge for fish: > > > start with "stdio rpath proc exec" since it pipes instructions to a pager > > > afterwards "stdio" is enough > > > > - just put the six lines of instructions into the manpage where they belong > > - remove fish.instr, remove instructions() > > - make the pledge a straightforward "stdio" > > > > This is what we did with quiz(6) before, > > and what I'm gonna do next with wump(6) and every other game > > which forks a PAGER just to spit out a help message. > > http://marc.info/?l=openbsd-tech&m=144576581513053&w=2
I disagreed with that change and I don't quite see the benefit of this patch. The recent churn in games was about the setgid bits which means we can't maintain the score files in /var/games as before, but it's NOT about minimizing pledge calls at all cost. There also is a point to be made that games should be reasonably self-contained. Note also that there is quite a bit of charm lost by reducing the text to the sober minimum. Let's try to treat the games with some respect.
