version 1.30, 2015/03/29 13:42:53 |
version 1.31, 2015/11/29 14:18:40 |
|
|
/* |
/* |
* 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); |
} |
} |
|
|
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); |