rb_sys_fail

Function rb_sys_fail 

Source
pub unsafe extern "C" fn rb_sys_fail(msg: *const c_char) -> !
Expand description

Converts a C errno into a Ruby exception, then raises it. For instance:

static VALUE
foo(VALUE argv)
{
   const auto cmd = StringValueCStr(argv);
   const auto waitr = system(cmd);
   if (waitr == -1) {
       [`rb_sys_fail`]"system(3posix)"); // <-------------- this
   }
   else {
       return INT2FIX(fd);
   }
}

ยง@param[in] msg Additional message to raise. @exception rb_eSystemCallError An exception representing errno. @note It never returns.

Generated by rb-sys for Ruby mri-x86_64-linux-gnu-3.2.3