[BACK]Return to tty.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/tty.c between version 1.8 and 1.9

version 1.8, 2009/06/27 12:57:14 version 1.9, 2009/07/07 17:24:32
Line 76 
Line 76 
 tty_init(struct tty *tty, char *path, char *term)  tty_init(struct tty *tty, char *path, char *term)
 {  {
         tty->path = xstrdup(path);          tty->path = xstrdup(path);
         if (term == NULL)          if (term == NULL || *term == '\0')
                 tty->termname = xstrdup("unknown");                  tty->termname = xstrdup("unknown");
         else          else
                 tty->termname = xstrdup(term);                  tty->termname = xstrdup(term);
Line 98 
Line 98 
         if ((mode = fcntl(tty->fd, F_GETFL)) == -1)          if ((mode = fcntl(tty->fd, F_GETFL)) == -1)
                 fatal("fcntl failed");                  fatal("fcntl failed");
         if (fcntl(tty->fd, F_SETFL, mode|O_NONBLOCK) == -1)          if (fcntl(tty->fd, F_SETFL, mode|O_NONBLOCK) == -1)
                 fatal("fcntl failedo");                  fatal("fcntl failed");
         if (fcntl(tty->fd, F_SETFD, FD_CLOEXEC) == -1)          if (fcntl(tty->fd, F_SETFD, FD_CLOEXEC) == -1)
                 fatal("fcntl failed");                  fatal("fcntl failed");
   

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9