Skip to content

Instantly share code, notes, and snippets.

@gouthamvel
Created January 11, 2012 10:19
Show Gist options
  • Save gouthamvel/1594033 to your computer and use it in GitHub Desktop.
Save gouthamvel/1594033 to your computer and use it in GitHub Desktop.
# template for
class ForkedProcess
def initialize *args
end
def receive_data data
#EM.popen form_cmd, ForkedProcess
end
def receive_stderr data
end
def unbind
end
end
class Foo
def process
EM.run do
EM.popen form_cmd, ForkedProcess
end
end
def form_cmd
'ls -lth'
end
end
foo = Foo.new
foo.process
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment