Subject: Re: bin/10879: su does not reset terminal settings after Ctrl-C
To: None <lucio@proxima.alt.za>
From: James Chacon <jchacon@genuity.net>
List: netbsd-bugs
Date: 08/24/2000 10:58:23
Ok, it's been a while since I wrote lots of signal code, but how exactly would
you query the current signal handler without changing it? sigaction/signal
only return the previous handler after you change it which is definitly not
what I'd want a library routine doing (race conditions, etc).

James

>
>On Thu, Aug 24, 2000 at 12:46:04AM -0400, James Chacon wrote:
>> 
>> Ok, this is gonna require some thinking to fix the behavior.
>> 
>You left out one possible option: block signals in getpass only if
>they are default.  Let su do its own intercept, and getpass can then
>assume that if the signals are being handled, it does not have to do
>so itself.  Su will have to include both a signal handler and a term
>setting restore, but that seems like a reasonable expectation.
>
>++L
>
>
>
>