Subject: Re: SIGINFO and NOKERNINFO
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 06/04/2006 19:02:58
> In the end, the more basic issue is that there should be a way to
> avoid printing kerninfo in the current process, that does not modify
> global state [the tty state] that persists after the process ends.

> Chuck had a good idea, indicating this via a signal flag.  The
> following code does this.

> Opinions?

I think the problem description is accurate.  I see some potential
problems, though.

In particular, what if the foreground process group contains multiple
processes, some of which set this bit and some of which don't?  Reading
the patch, it appears to pick some favoured process (according to
proc_compare()) and let that process's setting control.  This is
probably a reasonable first cut, but I'm not at all convinced it's the
rightest answer available.

Also, it seems that this then wants the tty setting to be a three-way
switch: (1) never print kernel info, (2) always print kernel info, (3)
let process signal flags control (with whatever resolution of the above
issue is decided upon).

However, this does not feel to me like a case where the good is the
enemy of the best.  If this goes in in its current form, a better form,
if/when it's decided upon, can be added incrementally....

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B