On Sun, Jul 07, 2002 at 03:28:51PM -0700, Mike Makonnen wrote: > MALLOC(copy, struct plimit *, sizeof(struct plimit), > M_SUBPROC, M_WAITOK); > - bcopy(lim->pl_rlimit, copy->pl_rlimit, sizeof(struct plimit)); > + bcopy(lim->pl_rlimit, copy->pl_rlimit, sizeof(struct rlimit));
Since pl_rlimit is an array of struct rlimits, don't we want: bcopy(lim->pl_rlimit, copy->pl_rlimit, sizeof(struct rlimit)*RLIM_NLIMITS); or maybe: bcopy(&(lim->pl_rlimit[0]), &(copy->pl_rlimit[0]), sizeof(lim->pl_rlimit)); rather than just copying the first limit? It might be better to just bcopy the whole struct plimit and make a note that other fields need to be reset. David. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message