Guest User

Untitled

a guest
Feb 21st, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # Pass it a hash in the form of:
  2. # create_process(:cmd => 'COMMAND')
  3. # create_process(:dir => '/foo/bar', :cmd => "COMMAND")
  4.  
  5. def create_process(args)
  6. unless pid = fork
  7. Dir.chdir args[:dir] || '.'
  8. exec(*args[:cmd])
  9. end
  10. end
Add Comment
Please, Sign In to add comment