Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2007 20:02:21 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.bin/write write.c
Message-ID:  <200711122002.lACK2LPg039340@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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