ioctl(...)
public
Provides a mechanism for issuing low-level commands to control or query I/O
devices. 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. On Unix
platforms, see ioctl(2) for details. Not
implemented on all platforms.
Show source
/*
* call-seq:
* ios.ioctl(integer_cmd, arg) => integer
*
* Provides a mechanism for issuing low-level commands to control or
* query I/O devices. Arguments and results are platform dependent. If
* <i>arg</i> is a number, its value is passed directly. If it is a
* string, it is interpreted as a binary sequence of bytes. On Unix
* platforms, see <code>ioctl(2)</code> for details. Not implemented on
* all platforms.
*/
static VALUE
rb_io_ioctl(argc, argv, io)
int argc;
VALUE *argv;
VALUE io;
{
VALUE req, arg;
rb_scan_args(argc, argv, "11", &req, &arg);
return rb_io_ctl(io, req, arg, 1);
}