Cosmetics. related to getting prototypes into view.
This commit is contained in:
parent
3d05297c86
commit
d93f860c60
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3485
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
|
||||
* $Id: kern_fork.c,v 1.7 1994/10/02 04:45:47 davidg Exp $
|
||||
* $Id: kern_fork.c,v 1.8 1994/10/09 07:34:55 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -51,6 +51,8 @@
|
||||
#include <sys/acct.h>
|
||||
#include <sys/ktrace.h>
|
||||
|
||||
#include <vm/vm.h>
|
||||
|
||||
static int fork1(struct proc *, int, int *);
|
||||
|
||||
struct fork_args {
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_proc.c 8.4 (Berkeley) 1/4/94
|
||||
* $Id: kern_proc.c,v 1.7 1994/10/02 04:45:48 davidg Exp $
|
||||
* $Id: kern_proc.c,v 1.8 1994/10/09 07:34:57 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,7 +58,6 @@ volatile struct proc *allproc; /* all processes */
|
||||
struct proc *zombproc; /* just zombies */
|
||||
|
||||
void pgdelete __P((struct pgrp *));
|
||||
void fixjobc __P((struct proc *, struct pgrp *, int));
|
||||
|
||||
/*
|
||||
* Structure associated with user cacheing.
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_resource.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: kern_resource.c,v 1.5 1994/09/25 19:33:42 phk Exp $
|
||||
* $Id: kern_resource.c,v 1.6 1994/10/02 04:45:49 davidg Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -49,6 +49,9 @@
|
||||
|
||||
#include <vm/vm.h>
|
||||
|
||||
int donice __P((struct proc *, struct proc *, int));
|
||||
int dosetrlimit __P((struct proc *, u_int, struct rlimit *));
|
||||
|
||||
/*
|
||||
* Resource controls and accounting.
|
||||
*/
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_sig.c 8.7 (Berkeley) 4/18/94
|
||||
* $Id: kern_sig.c,v 1.5 1994/09/25 19:33:43 phk Exp $
|
||||
* $Id: kern_sig.c,v 1.6 1994/09/30 00:38:34 ache Exp $
|
||||
*/
|
||||
|
||||
#define SIGPROP /* include signal properties table */
|
||||
@ -495,6 +495,56 @@ sigaltstack(p, uap, retval)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Common code for kill process group/broadcast kill.
|
||||
* cp is calling process.
|
||||
*/
|
||||
int
|
||||
killpg1(cp, signum, pgid, all)
|
||||
register struct proc *cp;
|
||||
int signum, pgid, all;
|
||||
{
|
||||
register struct proc *p;
|
||||
register struct pcred *pc = cp->p_cred;
|
||||
struct pgrp *pgrp;
|
||||
int nfound = 0;
|
||||
|
||||
if (all)
|
||||
/*
|
||||
* broadcast
|
||||
*/
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_next) {
|
||||
if (p->p_pid <= 1 || p->p_flag & P_SYSTEM ||
|
||||
p == cp || !CANSIGNAL(cp, pc, p, signum))
|
||||
continue;
|
||||
nfound++;
|
||||
if (signum)
|
||||
psignal(p, signum);
|
||||
}
|
||||
else {
|
||||
if (pgid == 0)
|
||||
/*
|
||||
* zero pgid means send to my process group.
|
||||
*/
|
||||
pgrp = cp->p_pgrp;
|
||||
else {
|
||||
pgrp = pgfind(pgid);
|
||||
if (pgrp == NULL)
|
||||
return (ESRCH);
|
||||
}
|
||||
for (p = pgrp->pg_mem; p != NULL; p = p->p_pgrpnxt) {
|
||||
if (p->p_pid <= 1 || p->p_flag & P_SYSTEM ||
|
||||
p->p_stat == SZOMB ||
|
||||
!CANSIGNAL(cp, pc, p, signum))
|
||||
continue;
|
||||
nfound++;
|
||||
if (signum)
|
||||
psignal(p, signum);
|
||||
}
|
||||
}
|
||||
return (nfound ? 0 : ESRCH);
|
||||
}
|
||||
|
||||
struct kill_args {
|
||||
int pid;
|
||||
int signum;
|
||||
@ -551,56 +601,6 @@ okillpg(p, uap, retval)
|
||||
}
|
||||
#endif /* COMPAT_43 || COMPAT_SUNOS */
|
||||
|
||||
/*
|
||||
* Common code for kill process group/broadcast kill.
|
||||
* cp is calling process.
|
||||
*/
|
||||
int
|
||||
killpg1(cp, signum, pgid, all)
|
||||
register struct proc *cp;
|
||||
int signum, pgid, all;
|
||||
{
|
||||
register struct proc *p;
|
||||
register struct pcred *pc = cp->p_cred;
|
||||
struct pgrp *pgrp;
|
||||
int nfound = 0;
|
||||
|
||||
if (all)
|
||||
/*
|
||||
* broadcast
|
||||
*/
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_next) {
|
||||
if (p->p_pid <= 1 || p->p_flag & P_SYSTEM ||
|
||||
p == cp || !CANSIGNAL(cp, pc, p, signum))
|
||||
continue;
|
||||
nfound++;
|
||||
if (signum)
|
||||
psignal(p, signum);
|
||||
}
|
||||
else {
|
||||
if (pgid == 0)
|
||||
/*
|
||||
* zero pgid means send to my process group.
|
||||
*/
|
||||
pgrp = cp->p_pgrp;
|
||||
else {
|
||||
pgrp = pgfind(pgid);
|
||||
if (pgrp == NULL)
|
||||
return (ESRCH);
|
||||
}
|
||||
for (p = pgrp->pg_mem; p != NULL; p = p->p_pgrpnxt) {
|
||||
if (p->p_pid <= 1 || p->p_flag & P_SYSTEM ||
|
||||
p->p_stat == SZOMB ||
|
||||
!CANSIGNAL(cp, pc, p, signum))
|
||||
continue;
|
||||
nfound++;
|
||||
if (signum)
|
||||
psignal(p, signum);
|
||||
}
|
||||
}
|
||||
return (nfound ? 0 : ESRCH);
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a signal to a process group.
|
||||
*/
|
||||
@ -962,8 +962,8 @@ issignal(p)
|
||||
* Are you sure you want to ignore SIGSEGV
|
||||
* in init? XXX
|
||||
*/
|
||||
printf("Process (pid %d) got signal %d\n",
|
||||
p->p_pid, signum);
|
||||
printf("Process (pid %lu) got signal %d\n",
|
||||
(u_long)p->p_pid, signum);
|
||||
#endif
|
||||
break; /* == ignore */
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)sys_generic.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: sys_generic.c,v 1.6 1994/09/25 19:33:48 phk Exp $
|
||||
* $Id: sys_generic.c,v 1.7 1994/10/02 17:35:24 phk Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,6 +58,8 @@
|
||||
#endif
|
||||
#include <vm/vm.h>
|
||||
|
||||
int selscan __P((struct proc *, fd_set *, fd_set *, int, int *));
|
||||
|
||||
/*
|
||||
* Read system call.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user