Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

IO#ioctl

(::Integer integer_cmd, ::String | ::Integer argument) -> ::Integer
ioctl(integer_cmd, argument) → integer

Invokes Posix system call ioctl(2), which issues a low-level command to an I/O device.

Issues a low-level command to an I/O device. The arguments and returned value are platform-dependent. The effect of the call is platform-dependent.

If argument argument is an integer, it is passed directly; if it is a string, it is interpreted as a binary sequence of bytes.

Not implemented on all platforms.

See also #internal_encoding #ioflush #inspect #isatty also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0