Created
May 14, 2009 05:04
-
-
Save headius/111495 to your computer and use it in GitHub Desktop.
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 Exec | |
extend FFI::Library | |
attach_function :my_exec, :execl, [:string, :string, :varargs], :int | |
attach_function :fork, [], :int | |
end | |
vim1 = '/usr/bin/vim' | |
vim2 = 'vim' | |
if Exec.fork == 0 | |
Exec.my_exec vim1, vim2, :pointer, nil | |
end | |
Process.waitall |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment