Module: CRIU
- Defined in:
- lib/criu.rb,
lib/criu/version.rb,
ext/criu/criu.c
Defined Under Namespace
Classes: Error
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
- ._init_options ⇒ Object
- ._set_images_dir_fd ⇒ Object
- .dump ⇒ Object
- .images_dir=(path) ⇒ Object
- .log_file= ⇒ Object
- .log_level= ⇒ Object
- .pid= ⇒ Object
- .service_address= ⇒ Object
Class Method Details
._init_options ⇒ Object
5 6 7 8 9 10 11 |
# File 'ext/criu/criu.c', line 5
static VALUE
rb_criu_init_options (VALUE klass) {
if(criu_init_opts() < 0) {
rb_raise(rb_eRuntimeError, "criu_init_opts failed");
}
return Qtrue;
}
|
._set_images_dir_fd ⇒ Object
19 20 21 22 23 |
# File 'ext/criu/criu.c', line 19
static VALUE
rb_criu_set_images_dir_fd (VALUE klass, VALUE fd) {
criu_set_images_dir_fd(NUM2INT(fd));
return fd;
}
|
.dump ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'ext/criu/criu.c', line 43
static VALUE
rb_criu_dump (VALUE klass) {
if(criu_dump() < 0) {
perror("ruby-criu"); /* FIXME: debug... */
rb_raise(rb_eRuntimeError, "criu_dump failed");
}
return Qtrue;
}
|
.images_dir=(path) ⇒ Object
9 10 11 12 13 |
# File 'lib/criu.rb', line 9 def images_dir=(path) @images_dir = File.open(path, 'r') self._set_images_dir_fd(@images_dir.fileno) return path end |
.log_file= ⇒ Object
37 38 39 40 41 |
# File 'ext/criu/criu.c', line 37
static VALUE
rb_criu_set_log_file (VALUE klass, VALUE path) {
criu_set_log_file(RSTRING_PTR(path));
return path;
}
|
.log_level= ⇒ Object
31 32 33 34 35 |
# File 'ext/criu/criu.c', line 31
static VALUE
rb_criu_set_log_level (VALUE klass, VALUE level) {
criu_set_log_level(NUM2INT(level));
return level;
}
|
.pid= ⇒ Object
25 26 27 28 29 |
# File 'ext/criu/criu.c', line 25
static VALUE
rb_criu_set_pid (VALUE klass, VALUE pid) {
criu_set_pid(NUM2INT(pid));
return pid;
}
|
.service_address= ⇒ Object
13 14 15 16 17 |
# File 'ext/criu/criu.c', line 13
static VALUE
rb_criu_set_service_address (VALUE klass, VALUE path) {
criu_set_service_address(RSTRING_PTR(path));
return path;
}
|