add and use xopen_nonblocking (-18b)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Bernhard Reutner-Fischer
2009-10-26 23:27:08 +01:00
committed by Denys Vlasenko
parent ca254490d7
commit a48308701a
8 changed files with 17 additions and 7 deletions

View File

@@ -1295,7 +1295,7 @@ int stty_main(int argc, char **argv)
if (file_name) {
int fd, fdflags;
G.device_name = file_name;
fd = xopen(G.device_name, O_RDONLY | O_NONBLOCK);
fd = xopen_nonblocking(G.device_name);
if (fd != STDIN_FILENO) {
dup2(fd, STDIN_FILENO);
close(fd);