Noux: add F_SETFL to libc_noux's fcntl()

Among other things it is used to set non-blocking mode, so we should
support it (e.g. fcntl(d, F_SETFL, fl | O_NONBLOCK)).
This commit is contained in:
Josef Söntgen 2012-08-21 15:12:41 +02:00 committed by Norman Feske
parent 4aac3933b3
commit a6904b4deb

View File

@ -1034,6 +1034,12 @@ namespace {
sysio()->fcntl_in.cmd = Noux::Sysio::FCNTL_CMD_GET_FILE_STATUS_FLAGS;
break;
case F_SETFL:
PINF("fcntl: F_SETFL for libc_fd=%d", fd->libc_fd);
sysio()->fcntl_in.cmd = Noux::Sysio::FCNTL_CMD_SET_FILE_STATUS_FLAGS;
sysio()->fcntl_in.long_arg = arg;
break;
default:
PERR("fcntl: unsupported command %d", cmd);
errno = EINVAL;