From owner-freebsd-current Thu Jun 7 3:24:17 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 1D6CB37B409; Thu, 7 Jun 2001 03:24:14 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA08881; Thu, 7 Jun 2001 20:23:52 +1000 Date: Thu, 7 Jun 2001 20:22:00 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Mark Murray Cc: Maxim Sobolev , current@FreeBSD.ORG Subject: Re: PAM forgets to unblock signals [was Terminal line discipline is broken [sorta]] In-Reply-To: <200106070820.f578K0659475@gratis.grondar.za> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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