Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
Kernel
/
//opt/alt/ruby21/share/ri/2.1.0/system/Kernel/syscall-i.ri
U:RDoc::AnyMethod[iI"syscall:ETI"Kernel#syscall;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Verbatim; [I"ACalls the operating system function identified by _num_ and ;TI"Ereturns the result of the function or raises SystemCallError if ;TI"it failed. ;TI" ;TI"FArguments for the function can follow _num_. They must be either ;TI"H+String+ objects or +Integer+ objects. A +String+ object is passed ;TI"Fas a pointer to the byte sequence. An +Integer+ object is passed ;TI"8as an integer whose bit size is same as a pointer. ;TI"?Up to nine parameters may be passed (14 on the Atari-ST). ;TI" ;TI"0The function identified by _num_ is system ;TI"Idependent. On some Unix systems, the numbers may be obtained from a ;TI"0header file called <code>syscall.h</code>. ;TI" ;TI"B syscall 4, 1, "hello\n", 6 # '4' is write(2) on our box ;TI" ;TI"<em>produces:</em> ;TI" ;TI" hello ;TI" ;TI"DCalling +syscall+ on a platform which does not have any way to ;TI"Gan arbitrary system function just fails with NotImplementedError. ;T:@format0o:RDoc::Markup::List: @type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I" Note;T; [o:RDoc::Markup::Paragraph; [I"S+syscall+ is essentially unsafe and unportable. Feel free to shoot your foot. ;TI"TDL (Fiddle) library is preferred for safer and a bit more portable programming.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"+syscall(num [, args...]) -> integer ;T0[ I"(*args);T@-FI"Kernel;TcRDoc::NormalModule00