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

Diff for /src/usr.bin/telnet/sys_bsd.c between version 1.30 and 1.31

version 1.30, 2015/03/29 13:42:53 version 1.31, 2015/11/29 14:18:40
Line 266 
Line 266 
             /*              /*
              * Wait for data to drain, then flush again.               * Wait for data to drain, then flush again.
              */               */
             tcsetattr(tin, TCSADRAIN, &tmp_tc);              if (isatty(tin))
                   tcsetattr(tin, TCSADRAIN, &tmp_tc);
             old = ttyflush(SYNCHing|flushout);              old = ttyflush(SYNCHing|flushout);
         } while (old < 0 || old > 1);          } while (old < 0 || old > 1);
     }      }
Line 414 
Line 415 
         sigprocmask(SIG_UNBLOCK, &mask, NULL);          sigprocmask(SIG_UNBLOCK, &mask, NULL);
         tmp_tc = old_tc;          tmp_tc = old_tc;
     }      }
     if (tcsetattr(tin, TCSADRAIN, &tmp_tc) < 0)      if (isatty(tin) && tcsetattr(tin, TCSADRAIN, &tmp_tc) < 0)
         tcsetattr(tin, TCSANOW, &tmp_tc);          tcsetattr(tin, TCSANOW, &tmp_tc);
   
     ioctl(tin, FIONBIO, &onoff);      ioctl(tin, FIONBIO, &onoff);

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31