Date: Thu, 7 Jun 2001 20:22:00 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mark Murray <mark@grondar.za> Cc: Maxim Sobolev <sobomax@FreeBSD.ORG>, current@FreeBSD.ORG Subject: Re: PAM forgets to unblock signals [was Terminal line discipline is broken [sorta]] Message-ID: <Pine.BSF.4.21.0106072009430.4286-100000@besplex.bde.org> In-Reply-To: <200106070820.f578K0659475@gratis.grondar.za>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 7 Jun 2001, Mark Murray wrote:
> > That explains... Attached patch solved the problem for me.
> 
> I have a functionally similar but less clean patch in BDE's court
> for testing. Thanks for letting me know this works - I'll commit
> it.
Yours seems to be more clean (it's shorter and uses to fewer gotos).
Why not reduce it to 1 line by putting the sigprocmask() together with
the tcsetattr() for the usual case like it already is for the unusual
case?
Index: misc_conv.c
===================================================================
RCS file: /home/ncvs/src/contrib/libpam/libpam_misc/misc_conv.c,v
retrieving revision 1.4
diff -u -2 -r1.4 misc_conv.c
--- misc_conv.c	2001/06/04 20:59:49	1.4
+++ misc_conv.c	2001/06/07 10:19:02
@@ -182,4 +182,5 @@
 	    nc = read(STDIN_FILENO, line, INPUTSIZE-1);
 	    if (have_term) {
+		(void)_sigprocmask(SIG_SETMASK, &oset, NULL);
 		(void) tcsetattr(STDIN_FILENO, TCSADRAIN, &term_before);
 		if (!echo || expired)             /* do we need a newline? */
Bruce
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106072009430.4286-100000>
