Date: Mon, 24 Jun 2002 23:20:03 -0700 (PDT) From: Paul Herman <pherman@frenchfries.net> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/38676: change request for pw command Message-ID: <200206250620.g5P6K3i14665@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/38676; it has been noted by GNATS. From: Paul Herman <pherman@frenchfries.net> To: "Matthew D. Fuller" <fullermd@over-yonder.net> Cc: FreeBSD-gnats-submit@FreeBSD.ORG, Takumi ISHII <takishii@xephion.ne.jp>, "Geoffrey C. Speicher" <geoff@sea-incorporated.com> Subject: Re: bin/38676: change request for pw command Date: Mon, 24 Jun 2002 23:07:14 -0700 (PDT) On Tue, 25 Jun 2002, Matthew D. Fuller wrote: > > + for (;;) { > > + [ stuff(); ] > > + close(infd); > > + } > > Might I suggest a sleep(1); in there? Give the poor CPU a break! :-> :-) That's what I first thought, but open() will block until the lock frees up. If the link count isn't 1, I don't think it should sleep, but it just as well could usleep() I suppose, but I don't think it's a big deal. This idea was taken from Matt Dillon's pwd_mkdb.c rev 1.29 fix. -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206250620.g5P6K3i14665>