]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Two fixes here:
authorcperciva <cperciva@FreeBSD.org>
Thu, 22 Jan 2004 04:24:15 +0000 (04:24 +0000)
committercperciva <cperciva@FreeBSD.org>
Thu, 22 Jan 2004 04:24:15 +0000 (04:24 +0000)
commit9c74fea4de8e77e9b92b5390dcae4094dc36eba9
treee48fdb610de4698d48e6fecbf521c827d2d0da5e
parent3474d78a20f157fc062bf5e4a9d97e1549bd4756
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.

PR: bin/60758
Approved by: rwatson (mentor)
usr.bin/lock/lock.c