Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Pass it a hash in the form of:
- # create_process(:cmd => 'COMMAND')
- # create_process(:dir => '/foo/bar', :cmd => "COMMAND")
- def create_process(args)
- unless pid = fork
- Dir.chdir args[:dir] || '.'
- exec(*args[:cmd])
- end
- end
Add Comment
Please, Sign In to add comment