From owner-cvs-all Tue Mar 11 3:21:55 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3785137B401; Tue, 11 Mar 2003 03:21:54 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FC0F43F3F; Tue, 11 Mar 2003 03:21:52 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id WAA32687; Tue, 11 Mar 2003 22:21:49 +1100 Date: Tue, 11 Mar 2003 22:21:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: David Xu Cc: src-committers@freebsd.org, "" , "" Subject: Re: cvs commit: src/usr.bin/su su.c In-Reply-To: <000501c2e7ad$48ab2790$f001a8c0@davidw2k> Message-ID: <20030311220538.U24745@gamplex.bde.org> References: <200303110010.h2B0ANe3061768@repoman.freebsd.org> <20030311180357.E23929@gamplex.bde.org> <000501c2e7ad$48ab2790$f001a8c0@davidw2k> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 11 Mar 2003, David Xu wrote: > Unfortunately I had ignored code for child process :( > BTW, The SIGTSTP handler will be reset by execsigs() in kernel, > The garbage sa_tstp is only effective in very short time. execsigs() only resets caught signals, so the garbage lives at least a little longer if happened to set to SIG_IGN. For the same reason, we can't depend on execsigs() changing SIG_IGN to SIG_DFL for the parent. I think the stack garbage is always 0 on i386 (since we're in main() and have barely used the stack), and SIG_DFL happens to be 0, so the contents of the garbage is probably correct for setting the signal to SIG_DFL except it doesn't have SA_RESTART set. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message