File: pid-count.cgi

package info (click to toggle)
libwebapp-ruby 0.4-2.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 240 kB
  • sloc: ruby: 2,245; makefile: 79
file content (14 lines) | stat: -rwxr-xr-x 206 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env ruby

require 'webapp'

count = 0 # This line runs once per process.

WebApp {|webapp|
  # This block runs once per request.
  webapp.puts <<"End"
pid: #$$
count: #{count}
End
  count += 1
}