{"blog_title":"kubo39's blog","url":"https://kubo39.hatenablog.com/entry/2015/01/02/074529","width":"100%","height":"190","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkubo39.hatenablog.com%2Fentry%2F2015%2F01%2F02%2F074529\" title=\"FFI gem\u3067clone(2)\u3092\u8a66\u3057\u3066\u307f\u305f - kubo39&#39;s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"kubo39","title":"FFI gem\u3067clone(2)\u3092\u8a66\u3057\u3066\u307f\u305f","published":"2015-01-02 07:45:29","categories":["Ruby"],"author_url":"https://blog.hatena.ne.jp/kubo39/","type":"rich","version":"1.0","description":"\u3075\u3068\u601d\u3044\u7acb\u3063\u3066clone(2)\u3092FFI gem\u3092\u4f7f\u3063\u3066\u547c\u3073\u51fa\u3057\u3066\u307f\u305f\u3002 \u30b3\u30fc\u30c9\u306f\u3053\u3093\u306a\u304b\u3093\u3058\u3002 require 'ffi' module LinuxClone extend FFI::Library ffi_lib 'libc.so.6' callback :f_c, [:void], :int attach_function :clone, [:f_c, :pointer, :int], :int attach_function :getpid, [], :int end stack = FFI::MemoryPointer.new(:char, 8096) stack_top = FFI:\u2026","blog_url":"https://kubo39.hatenablog.com/","image_url":null,"provider_url":"https://hatena.blog"}