Deleted Added
full compact
kern_event.c (92751) kern_event.c (96886)
1/*-
2 * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/kern/kern_event.c 92751 2002-03-20 04:09:59Z jeff $
26 * $FreeBSD: head/sys/kern/kern_event.c 96886 2002-05-19 00:14:50Z jhb $
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <sys/lock.h>
33#include <sys/mutex.h>
34#include <sys/proc.h>

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

191filt_procattach(struct knote *kn)
192{
193 struct proc *p;
194 int error;
195
196 p = pfind(kn->kn_id);
197 if (p == NULL)
198 return (ESRCH);
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <sys/lock.h>
33#include <sys/mutex.h>
34#include <sys/proc.h>

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

191filt_procattach(struct knote *kn)
192{
193 struct proc *p;
194 int error;
195
196 p = pfind(kn->kn_id);
197 if (p == NULL)
198 return (ESRCH);
199 if ((error = p_cansee(curproc, p))) {
199 if ((error = p_cansee(curthread, p))) {
200 PROC_UNLOCK(p);
201 return (error);
202 }
203
204 kn->kn_ptr.p_proc = p;
205 kn->kn_flags |= EV_CLEAR; /* automatically set */
206
207 /*

--- 875 unchanged lines hidden ---
200 PROC_UNLOCK(p);
201 return (error);
202 }
203
204 kn->kn_ptr.p_proc = p;
205 kn->kn_flags |= EV_CLEAR; /* automatically set */
206
207 /*

--- 875 unchanged lines hidden ---