fork download
  1. require "net/http"
  2. require 'builder'
  3.  
  4. require 'systemu'
  5. require "uri"
  6.  
  7. ENV['PROCPS_USERLEN'] = "25"
  8.  
  9. logged_in = %q( w -hf )
  10. status, stdout, stderr = systemu logged_in
  11.  
  12. buffer = StringIO.new
  13. event = Builder::XmlMarkup.new :target => buffer, :indent => 2
  14.  
  15. event.root do |tag|
  16. tag.div :id => 'event-source' do |node|
  17.  
  18. if ENV.include? 'PAM_SERVICE' do
  19. node << "SHELL"
  20. else
  21. end
  22.  
  23. end
  24.  
  25.  
  26. #tag.tag! "event-notification" do
  27. #end
  28. end
  29.  
  30. puts buffer.string
Runtime error #stdin #stdout 0s 4716KB
stdin
Standard input is empty
stdout
Standard output is empty