On Mon, Jun 15, 2009 at 09:24:26PM +0200, Darren Reed wrote: > http://cr.opensolaris.org/~darrenr/6271923-20090615/ > > It includes a fix for the bug identified by Nicolas earlier, 6851264.
Hmmm, I think you could still loop: + int which = RCTL_FIRST; - while (pr_getrctl(Pr, ctl_name, NULL, blk, RCTL_FIRST) != -1 && + while (pr_getrctl(Pr, ctl_name, NULL, blk, which) != -1 && rctlblk_get_privilege(blk) != RCPRIV_SYSTEM) { - if (pr_setrctl(Pr, ctl_name, NULL, blk, RCTL_DELETE) != 0) + if (pr_setrctl(Pr, ctl_name, NULL, blk, RCTL_DELETE) != 0) { failed++; + which = RCTL_NEXT; + } else { + which = RCTL_FIRST; + } Perhaps I'm being thick, but it seems to me that we're always re-trying on pr_setrctl() failure, without a limit to how many times we re-try -- at some point you've got to give up, even if it seems wrong for pr_setrctl() to fail repeatedly. Nico --