+ MALLOC(pgrphash[0], struct pgrp *, sizeof (struct pgrp),
+ M_PGRP, M_NOWAIT);
+ if ((pg = pgrphash[0]) == NULL)
+ panic("no space to craft zero'th process group");
+ pg->pg_id = 0;
+ pg->pg_hforw = 0;
+ pg->pg_mem = p;
+ pg->pg_jobc = 0;
+ p->p_pgrp = pg;
+ p->p_pgrpnxt = 0;
+ MALLOC(pg->pg_session, struct session *, sizeof (struct session),
+ M_SESSION, M_NOWAIT);
+ if (pg->pg_session == NULL)
+ panic("no space to craft zero'th session");
+ pg->pg_session->s_count = 1;
+ pg->pg_session->s_leader = 0;
+ /*
+ * These assume that the u. area is always mapped
+ * to the same virtual address. Otherwise must be
+ * handled when copying the u. area in newproc().
+ */
+ u.u_nd.ni_iov = &u.u_nd.ni_iovec;
+ u.u_ap = u.u_arg;
+ u.u_nd.ni_iovcnt = 1;
+
+ u.u_cmask = cmask;
+ u.u_lastfile = -1;