Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- include Process
- tests = $stdin.readlines
- log= File.open("/var/tmp/test","w")
- msg_rd,msg_wr = IO.pipe
- env_rd,env_wr = IO.pipe
- @pid = fork
- unless @pid
- $stdin.close
- msg_rd.dup
- msg_rd.close
- msg_wr.close
- $stdout.close
- env_rd.dup
- env_rd.close
- env_wr.close
- exec ( '/var/qmail/bin/qmail-queue' )
- end
- #msg_rd.close
- #env_rd.close
- env_wr.puts 'Fadmin@deeproot.in0Tdsdasddmin@deeproot.in00'
- env_wr.close
- msg_wr.puts "Received by QUBY"
- tests.each do |test|
- msg_wr.puts test
- end
- #log.puts tests
- #log.puts @pid
- #msg_wr.close
- wait(@pid)
- @success= $? >>8
- log.puts @success
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement