bin/60758: cycle-eating endless loop in lock(1)
David Schultz
das at FreeBSD.ORG
Mon Jan 19 19:30:19 PST 2004
The following reply was made to PR bin/60758; it has been noted by GNATS.
From: David Schultz <das at FreeBSD.ORG>
To: Colin Percival <cperciva at daemonology.net>
Cc: FreeBSD-gnats-submit at FreeBSD.ORG
Subject: Re: bin/60758: cycle-eating endless loop in lock(1)
Date: Mon, 19 Jan 2004 19:22:41 -0800
On Wed, Dec 31, 2003, Colin Percival wrote:
> Insert a sleep(1) call into the endless loop. This still leaves an orphan
> lying around, but since lock is important for security purposes, this is
> probably safer than exiting.
As you observe, it's not a good idea to exit the loop. On the
other hand, fgets(3) errors are generally not recoverable, so
calling sleep(1) seems a bit kludgy. How about just calling
pause(3) if an error occurs?
More information about the freebsd-bugs
mailing list