| status-curses-X.rb |
| Path: |
srv/status-curses-X.rb |
| Modified: |
Sun Apr 06 11:50:25 MDT 2003 |
|
|
main(): application itself starts here.
# File srv/status-curses-X.rb, line 51
def main(opts, args)
app = APPNAME.gsub(/-X$/, "")
xdisp = ENV["DISPLAY"]
return 1 if (xdisp.nil? || xdisp.size == 0)
argstr = args.map { |a| a.shellquote }.join(" ")
ENV["XTERM"] ||= "xterm"
fork {
Process.setsid
fork {
system("exec #{ENV["XTERM"]} -e #{app} #{argstr}")
}
}
Process.wait
return 0
end
Entry point if called as executable.
# File srv/status-curses-X.rb, line 93
def start(av)
main(nil, av)
end