cvs commit: src/usr.bin/write write.c

John Baldwin jhb at FreeBSD.org
Mon Nov 12 12:02:21 PST 2007


jhb         2007-11-12 20:02:21 UTC

  FreeBSD src repository

  Modified files:
    usr.bin/write        write.c 
  Log:
  write(1) needs to strip off the leading /dev/ from the tty name for the
  current tty as returned from ttyname(3) so it can try to avoid writing to
  the current tty if possible.  Previously, it did this by trimming off any
  leading directory (effectively performing a basename(3) on the path
  returned from ttyname(3)).  However, this chopped off too much of the path
  for ttys who have directories in their name such as pts(4).  Instead, just
  strip off the leading /dev/ from the path returned by ttyname(3).  This
  fixes write(1) when using pts(4).
  
  MFC after:      1 week
  Reported by:    rwatson
  
  Revision  Changes    Path
  1.19      +2 -3      src/usr.bin/write/write.c


More information about the cvs-all mailing list