Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jan 2004 20:24:15 -0800 (PST)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.bin/lock lock.c
Message-ID:  <200401220424.i0M4OF7S070599@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
cperciva    2004/01/21 20:24:15 PST

  FreeBSD src repository

  Modified files:
    usr.bin/lock         lock.c 
  Log:
  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)
  
  Revision  Changes    Path
  1.18      +4 -2      src/usr.bin/lock/lock.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401220424.i0M4OF7S070599>