diff options
author | truckman <truckman@FreeBSD.org> | 1998-11-11 10:56:07 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 1998-11-11 10:56:07 +0000 |
commit | d869e3568091433f9d3beb11c9f29c4fdd08f39a (patch) | |
tree | 18bf440741743ec4f31ffe9110554bf83aa39ddb | |
parent | de184682fa22833c7b18a96a136bc031ae786434 (diff) | |
download | FreeBSD-src-d869e3568091433f9d3beb11c9f29c4fdd08f39a.zip FreeBSD-src-d869e3568091433f9d3beb11c9f29c4fdd08f39a.tar.gz |
I got another batch of suggestions for cosmetic changes from bde.
-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 d2ef3e1..8fc26b2 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 a517358..9f046a3 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 01d8c4e..e6d9b34 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 03d0def..39ac489 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 d0ef510..9e537d3 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 6d3fb26..92b5562 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 064334d..9b06500 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 82cc217..07f1856 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 05cd696..4f9c07a 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 3caca7e..1e1a094 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. */ |