Method: IO#fcntl
- Defined in:
- io.c
permalink #fcntl(integer_cmd, arg) ⇒ Integer
Provides a mechanism for issuing low-level commands to control or query file-oriented I/O streams. Arguments and results are platform dependent. If arg is a number, its value is passed directly. If it is a string, it is interpreted as a binary sequence of bytes (Array#pack might be a useful way to build this string). On Unix platforms, see fcntl(2)
for details. Not implemented on all platforms.
10164 10165 10166 10167 10168 10169 10170 10171 |
# File 'io.c', line 10164
static VALUE
rb_io_fcntl(int argc, VALUE *argv, VALUE io)
{
VALUE req, arg;
rb_scan_args(argc, argv, "11", &req, &arg);
return rb_fcntl(io, req, arg);
}
|