cvs commit: src/usr.bin/lock lock.c
cperciva at FreeBSD.org
Wed Jan 21 20:24:17 PST 2004
cperciva 2004/01/21 20:24:15 PST
FreeBSD src repository
Two fixes here:
1. If fgets fails, don't go into an infinite cpu-intensive loop. Instead,
check to see if the terminal still exists, and sleep(1) otherwise.
2. When we check to see if the terminal still exists, make sure we're not
mislead by EINTR. This could have been a security issue, but fortunately
the current implementation of tcgetattr doesn't EINTR.
Approved by: rwatson (mentor)
Revision Changes Path
1.18 +4 -2 src/usr.bin/lock/lock.c
More information about the cvs-src