Created
February 22, 2012 15:10
-
-
Save hiboma/1885475 to your computer and use it in GitHub Desktop.
FFIでLXCをbindする - great
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ffi' | |
module LXC | |
extend FFI::Library | |
ffi_lib "/usr/local/lxc/lib/liblxc.so" | |
attach_function :lxc_stop, [ :string ], :int | |
end | |
puts LXC::lxc_stop(ARGV[0]) |
lxc_attachが動かないのは
- ffiがスレッド生成してる ?
root 3573 3573 0.0 2 0.5 39312 7012 pts/0 Sl+ 23:44 0:00 ruby test.rb
root 3573 3599 0.0 2 0.5 39312 7012 pts/0 Sl+ 23:44 0:00 ruby test.rb
- setnsシステムコールがマルチスレッドの場合(fs->users >1) -EINVAL 返す?
ざっくり。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
これすごい。