From owner-cvs-src@FreeBSD.ORG Tue Nov 8 09:09:27 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 64BAC16A41F; Tue, 8 Nov 2005 09:09:27 +0000 (GMT) (envelope-from davidxu@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F1F943D48; Tue, 8 Nov 2005 09:09:27 +0000 (GMT) (envelope-from davidxu@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jA899RZG076067; Tue, 8 Nov 2005 09:09:27 GMT (envelope-from davidxu@repoman.freebsd.org) Received: (from davidxu@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jA899Qvb076066; Tue, 8 Nov 2005 09:09:26 GMT (envelope-from davidxu) Message-Id: <200511080909.jA899Qvb076066@repoman.freebsd.org> From: David Xu Date: Tue, 8 Nov 2005 09:09:26 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sys proc.h signalvar.h src/sys/kern kern_exit.c kern_proc.c kern_sig.c kern_thread.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2005 09:09:27 -0000 davidxu 2005-11-08 09:09:26 UTC FreeBSD src repository Modified files: sys/sys proc.h signalvar.h sys/kern kern_exit.c kern_proc.c kern_sig.c kern_thread.c Log: Add support for queueing SIGCHLD same as other UNIX systems did. For each child process whose status has been changed, a SIGCHLD instance is queued, if the signal is stilling pending, and process changed status several times, signal information is updated to reflect latest process status. If wait() returns because the status of a child process is available, pending SIGCHLD signal associated with the child process is discarded. Any other pending SIGCHLD signals remain pending. The signal information is allocated at the same time when proc structure is allocated, if process signal queue is fully filled or there is a memory shortage, it can still send the signal to process. There is a booting time tunable kern.sigqueue.queue_sigchild which can control the behavior, setting it to zero disables the SIGCHLD queueing feature, the tunable will be removed if the function is proved that it is stable enough. Tested on: i386 (SMP and UP) Revision Changes Path 1.271 +25 -3 src/sys/kern/kern_exit.c 1.234 +4 -0 src/sys/kern/kern_proc.c 1.312 +87 -10 src/sys/kern/kern_sig.c 1.222 +15 -0 src/sys/kern/kern_thread.c 1.442 +4 -0 src/sys/sys/proc.h 1.74 +1 -1 src/sys/sys/signalvar.h