+/*
+ * set process group (setpgrp/setpgid)
+ *
+ * caller does setpgrp(pid, pgid)
+ *
+ * pid must be caller or child of caller (ESRCH)
+ * if a child
+ * pid must be in same session (EPERM)
+ * pid can't have done an exec (EACCES)
+ * if pgid != pid
+ * there must exist some pid in same session having pgid (EPERM)
+ * pid must not be session leader (EPERM)
+ */
+/* ARGSUSED */
+setpgrp(cp, uap, retval)
+ struct proc *cp;
+ register struct args {
+ int pid;
+ int pgid;
+ } *uap;
+ int *retval;