Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed README.md, CRIU.new, CRIU.target_pid= is undefined method. #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

minimum2scp
Copy link

@minimum2scp minimum2scp commented Feb 27, 2019

% bundle exec ruby -e '
require "criu"
CRIU.new(
  images_dir: "/tmp/process_dump"
)'
Traceback (most recent call last):
-e:3:in `<main>': undefined method `new' for CRIU:Module (NoMethodError)

It seems CRIU.new(images_dir: ...) should be CRIU.images_dir= ....
But CRIU.images_dir=... segv... (reported as #1).

```
% bundle exec ruby -e '
require "criu"
CRIU.new(
  images_dir: "/tmp/process_dump"
)'
Traceback (most recent call last):
-e:3:in `<main>': undefined method `new' for CRIU:Module (NoMethodError)
```
@minimum2scp
Copy link
Author

minimum2scp commented Feb 27, 2019

And CRIU.target_pid= should be CRIU.pid=... I will add commit.

% bundle exec ruby -ve '
require "criu"
CRIU._init_options
CRIU.images_dir = "/tmp/process_dump"
CRIU.target_pid = 123
'
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
Traceback (most recent call last):
-e:5:in `<main>': undefined method `target_pid=' for CRIU:Module (NoMethodError)

```
% bundle exec ruby -ve '
require "criu"
CRIU._init_options
CRIU.images_dir = "/tmp/process_dump"
CRIU.target_pid = 123
'
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
Traceback (most recent call last):
-e:5:in `<main>': undefined method `target_pid=' for CRIU:Module (NoMethodError)
```
@minimum2scp minimum2scp changed the title Fixed README.md, CRIU.new is undefined method. Fixed README.md, CRIU.new, CRIU.target_pid= is undefined method. Feb 27, 2019
@minimum2scp
Copy link
Author

And I found CRIU.restore method is not defined... (oh)

% bundle exec pry
[1] pry(main)> require 'criu'
=> true
[2] pry(main)> CRIU._init_options
=> true
[3] pry(main)> CRIU.images_dir = "/tmp/process_dump"
=> "/tmp/process_dump"
[4] pry(main)> CRIU.restore
NoMethodError: undefined method `restore' for CRIU:Module
from (pry):4:in `__pry__'
[5] pry(main)> ls CRIU
constants: Error  VERSION
CRIU.methods: _init_options  _set_images_dir_fd  dump  images_dir=  log_file=  log_level=  pid=  service_address=
instance variables: @images_dir
[6] pry(main)> 

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant