diff options
-rw-r--r-- | sys/kern/kern_descrip.c | 11 | ||||
-rw-r--r-- | sys/kern/kern_proc.c | 4 | ||||
-rw-r--r-- | sys/kern/subr_log.c | 4 | ||||
-rw-r--r-- | sys/net/bpfdesc.h | 4 | ||||
-rw-r--r-- | sys/net/if_tunvar.h | 4 | ||||
-rw-r--r-- | sys/sys/filedesc.h | 10 | ||||
-rw-r--r-- | sys/sys/pipe.h | 4 | ||||
-rw-r--r-- | sys/sys/proc.h | 8 | ||||
-rw-r--r-- | sys/sys/socketvar.h | 5 | ||||
-rw-r--r-- | sys/sys/tty.h | 4 |
10 files changed, 31 insertions, 27 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index d2ef3e17f09e..8fc26b20f486 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94 - * $Id: kern_descrip.c,v 1.55 1998/07/29 17:38:13 bde Exp $ + * $Id: kern_descrip.c,v 1.56 1998/11/11 10:03:54 truckman Exp $ */ #include "opt_compat.h" @@ -398,15 +398,16 @@ fsetown(pgid, sigiop) pid_t pgid; struct sigio **sigiop; { - struct proc *proc = NULL; - struct pgrp *pgrp = NULL; + struct proc *proc; + struct pgrp *pgrp; struct sigio *sigio; int s; if (pgid == 0) { funsetown(*sigiop); return (0); - } else if (pgid > 0) { + } + if (pgid > 0) { proc = pfind(pgid); if (proc == NULL) return (ESRCH); @@ -420,6 +421,7 @@ fsetown(pgid, sigiop) */ else if (proc->p_session != curproc->p_session) return (EPERM); + pgrp = NULL; } else /* if (pgid < 0) */ { pgrp = pgfind(-pgid); if (pgrp == NULL) @@ -434,6 +436,7 @@ fsetown(pgid, sigiop) */ else if (pgrp->pg_session != curproc->p_session) return (EPERM); + proc = NULL; } funsetown(*sigiop); MALLOC(sigio, struct sigio *, sizeof(struct sigio), M_SIGIO, diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index a51735880943..9f046a31e1fe 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 - * $Id: kern_proc.c,v 1.38 1998/11/09 15:07:41 truckman Exp $ + * $Id: kern_proc.c,v 1.39 1998/11/11 10:03:55 truckman Exp $ */ #include <sys/param.h> @@ -40,6 +40,7 @@ #include <sys/sysctl.h> #include <sys/proc.h> #include <sys/malloc.h> +#include <sys/filedesc.h> #include <sys/tty.h> #include <sys/signalvar.h> #include <vm/vm.h> @@ -48,7 +49,6 @@ #include <vm/vm_map.h> #include <sys/user.h> #include <vm/vm_zone.h> -#include <sys/filedesc.h> static MALLOC_DEFINE(M_PGRP, "pgrp", "process group header"); MALLOC_DEFINE(M_SESSION, "session", "session header"); diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index 01d8c4eb6a06..e6d9b345e905 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)subr_log.c 8.1 (Berkeley) 6/10/93 - * $Id: subr_log.c,v 1.30 1998/06/07 17:11:38 dfr Exp $ + * $Id: subr_log.c,v 1.31 1998/11/11 10:03:55 truckman Exp $ */ /* @@ -76,7 +76,7 @@ static struct cdevsw log_cdevsw = static struct logsoftc { int sc_state; /* see above for possibilities */ struct selinfo sc_selp; /* process waiting on select call */ - struct sigio *sc_sigio; /* information for SIGIO */ + struct sigio *sc_sigio; /* information for async I/O */ } logsoftc; int log_open; /* also used in log() */ diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h index 03d0defa495d..39ac4897915f 100644 --- a/sys/net/bpfdesc.h +++ b/sys/net/bpfdesc.h @@ -37,7 +37,7 @@ * * @(#)bpfdesc.h 8.1 (Berkeley) 6/10/93 * - * $Id: bpfdesc.h,v 1.10 1997/02/22 09:40:57 peter Exp $ + * $Id: bpfdesc.h,v 1.11 1998/11/11 10:04:09 truckman Exp $ */ #ifndef _NET_BPFDESC_H_ @@ -78,7 +78,7 @@ struct bpf_d { u_char bd_immediate; /* true to return on packet arrival */ int bd_async; /* non-zero if packet reception should generate signal */ int bd_sig; /* signal to send upon packet reception */ - struct sigio * bd_sigio; /* information for SIGIO */ + struct sigio * bd_sigio; /* information for async I/O */ #if BSD < 199103 u_char bd_selcoll; /* true if selects collide */ int bd_timedout; diff --git a/sys/net/if_tunvar.h b/sys/net/if_tunvar.h index d0ef510e98d9..9e537d3abef8 100644 --- a/sys/net/if_tunvar.h +++ b/sys/net/if_tunvar.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_tunvar.h,v 1.1 1998/01/11 17:52:33 brian Exp $ + * $Id: if_tunvar.h,v 1.2 1998/11/11 10:04:10 truckman Exp $ */ #ifndef _NET_IF_TUNVAR_H_ @@ -42,7 +42,7 @@ struct tun_softc { #define TUN_READY (TUN_OPEN | TUN_INITED) struct ifnet tun_if; /* the interface */ - struct sigio *tun_sigio; /* information for SIGIO */ + struct sigio *tun_sigio; /* information for async I/O */ struct selinfo tun_rsel; /* read select */ struct selinfo tun_wsel; /* write select (not used) */ }; diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 6d3fb26c7e3e..92b5562ff91d 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)filedesc.h 8.1 (Berkeley) 6/2/93 - * $Id: filedesc.h,v 1.13 1997/12/05 18:58:10 bde Exp $ + * $Id: filedesc.h,v 1.14 1998/11/11 10:04:12 truckman Exp $ */ #ifndef _SYS_FILEDESC_H_ @@ -102,14 +102,14 @@ struct filedesc0 { */ struct sigio { union { - struct proc *siu_proc; /* Process to receive SIGIO/SIGURG */ - struct pgrp *siu_pgrp; /* Process group to receive ... */ + struct proc *siu_proc; /* process to receive SIGIO/SIGURG */ + struct pgrp *siu_pgrp; /* process group to receive ... */ } sio_u; SLIST_ENTRY(sigio) sio_pgsigio; /* sigio's for process or group */ struct sigio **sio_myref; /* location of the pointer that holds * the reference to this structure */ - struct ucred *sio_ucred; /* Current credentials */ - uid_t sio_ruid; /* Real user id */ + struct ucred *sio_ucred; /* current credentials */ + uid_t sio_ruid; /* real user id */ pid_t sio_pgid; /* pgid for signals */ }; #define sio_proc sio_u.siu_proc diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h index 064334d689b0..9b06500d75c2 100644 --- a/sys/sys/pipe.h +++ b/sys/sys/pipe.h @@ -18,7 +18,7 @@ * 5. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: pipe.h,v 1.10 1998/03/26 20:53:26 phk Exp $ + * $Id: pipe.h,v 1.11 1998/11/11 10:04:12 truckman Exp $ */ #ifndef _SYS_PIPE_H_ @@ -102,7 +102,7 @@ struct pipe { struct timespec pipe_atime; /* time of last access */ struct timespec pipe_mtime; /* time of last modify */ struct timespec pipe_ctime; /* time of status change */ - struct sigio *pipe_sigio; /* information for SIGIO */ + struct sigio *pipe_sigio; /* information for async I/O */ struct pipe *pipe_peer; /* link with other direction */ u_int pipe_state; /* pipe status info */ int pipe_busy; /* busy flag, mostly to handle rundown sanely */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 82cc217ab2e2..07f18560836a 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)proc.h 8.15 (Berkeley) 5/19/95 - * $Id: proc.h,v 1.59 1998/11/09 15:08:04 truckman Exp $ + * $Id: proc.h,v 1.60 1998/11/11 10:04:12 truckman Exp $ */ #ifndef _SYS_PROC_H_ @@ -52,7 +52,7 @@ #endif #include <sys/ucred.h> #include <sys/queue.h> -#include <sys/filedesc.h> /* For struct sigiolst */ +#include <sys/filedesc.h> /* * One structure allocated per session. @@ -73,7 +73,7 @@ struct pgrp { LIST_ENTRY(pgrp) pg_hash; /* Hash chain. */ LIST_HEAD(, proc) pg_members; /* Pointer to pgrp members. */ struct session *pg_session; /* Pointer to session. */ - struct sigiolst pg_sigiolst; /* List of sigio sources */ + struct sigiolst pg_sigiolst; /* List of sigio sources. */ pid_t pg_id; /* Pgrp id. */ int pg_jobc; /* # procs qualifying pgrp for job control */ }; @@ -163,7 +163,7 @@ struct proc { unsigned char p_pfsflags; /* procfs flags */ char p_pad3[2]; /* padding for alignment */ register_t p_retval[2]; /* syscall aux returns */ - struct sigiolst p_sigiolst; /* List of sigio sources */ + struct sigiolst p_sigiolst; /* list of sigio sources */ /* End area that is zeroed on creation. */ #define p_endzero p_startcopy diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 05cd6961b2e4..4f9c07acfa0b 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)socketvar.h 8.3 (Berkeley) 2/19/95 - * $Id: socketvar.h,v 1.30 1998/11/05 14:28:25 dg Exp $ + * $Id: socketvar.h,v 1.31 1998/11/11 10:04:13 truckman Exp $ */ #ifndef _SYS_SOCKETVAR_H_ @@ -77,7 +77,8 @@ struct socket { short so_qlimit; /* max number queued connections */ short so_timeo; /* connection timeout */ u_short so_error; /* error affecting connection */ - struct sigio *so_sigio; /* information for SIGIO/SIGURG */ + struct sigio *so_sigio; /* information for async I/O or + out of band data (SIGURG) */ u_long so_oobmark; /* chars to oob mark */ /* * Variables for socket buffering. diff --git a/sys/sys/tty.h b/sys/sys/tty.h index 3caca7e195b4..1e1a094df919 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.h 8.6 (Berkeley) 1/21/94 - * $Id: tty.h,v 1.42 1998/06/07 17:13:04 dfr Exp $ + * $Id: tty.h,v 1.43 1998/11/11 10:04:13 truckman Exp $ */ #ifndef _SYS_TTY_H_ @@ -79,7 +79,7 @@ struct tty { int t_timeout; /* Timeout for ttywait() */ struct pgrp *t_pgrp; /* Foreground process group. */ struct session *t_session; /* Enclosing session. */ - struct sigio *t_sigio; /* information for SIGIO */ + struct sigio *t_sigio; /* Information for async I/O. */ struct selinfo t_rsel; /* Tty read/oob select. */ struct selinfo t_wsel; /* Tty write select. */ struct termios t_termios; /* Termios state. */ |