Deleted Added
full compact
kern_exit.c (109205) kern_exit.c (109623)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

--- 22 unchanged lines hidden (view full) ---

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
39 * $FreeBSD: head/sys/kern/kern_exit.c 109205 2003-01-13 23:04:32Z dillon $
39 * $FreeBSD: head/sys/kern/kern_exit.c 109623 2003-01-21 08:56:16Z alfred $
40 */
41
42#include "opt_compat.h"
43#include "opt_ktrace.h"
44#include "opt_mac.h"
45
46#include <sys/param.h>
47#include <sys/systm.h>

--- 188 unchanged lines hidden (view full) ---

236 * XXX what if one of these generates an error?
237 */
238 TAILQ_FOREACH(ep, &exit_list, next)
239 (*ep->function)(p);
240
241 stopprofclock(p);
242
243 MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage),
40 */
41
42#include "opt_compat.h"
43#include "opt_ktrace.h"
44#include "opt_mac.h"
45
46#include <sys/param.h>
47#include <sys/systm.h>

--- 188 unchanged lines hidden (view full) ---

236 * XXX what if one of these generates an error?
237 */
238 TAILQ_FOREACH(ep, &exit_list, next)
239 (*ep->function)(p);
240
241 stopprofclock(p);
242
243 MALLOC(p->p_ru, struct rusage *, sizeof(struct rusage),
244 M_ZOMBIE, M_WAITOK);
244 M_ZOMBIE, 0);
245 /*
246 * If parent is waiting for us to exit or exec,
247 * P_PPWAIT is set; we will wakeup the parent below.
248 */
249 PROC_LOCK(p);
250 p->p_flag &= ~(P_TRACED | P_PPWAIT);
251 SIGEMPTYSET(p->p_siglist);
252 PROC_UNLOCK(p);

--- 627 unchanged lines hidden ---
245 /*
246 * If parent is waiting for us to exit or exec,
247 * P_PPWAIT is set; we will wakeup the parent below.
248 */
249 PROC_LOCK(p);
250 p->p_flag &= ~(P_TRACED | P_PPWAIT);
251 SIGEMPTYSET(p->p_siglist);
252 PROC_UNLOCK(p);

--- 627 unchanged lines hidden ---