We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Remove dead code.
Hongli Lai (Phusion) (author)
Thu Nov 20 09:08:17 -0800 2008
commit  1a50019b772d620b0dd696c5b1e5916d7e79a603
tree    31e928167cef0f82bed2a3b3a088fb5fa610762c
parent  d320ad6f10cd547cb3b4caee5e5c6aed8c03d4dc
...
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
...
29
30
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
33
34
0
@@ -29,34 +29,6 @@ BOLD = "\e[1m"
0
 YELLOW = "\e[33m"
0
 BLUE_BG = "\e[44m"
0
 
0
-# Returns an array of all status FIFO files that are alive,
0
-# and attempt to remove stale status FIFO files.
0
-def list_and_clean_status_fifos
0
- result = []
0
- Dir["/tmp/passenger.*/status.fifo"].each do |filename|
0
- filename =~ /passenger.(\d+)/
0
- pid = $1.to_i
0
- if process_is_alive?(pid)
0
- result << StatusFifo.new(filename, pid)
0
- else
0
- puts "*** NOTICE: Removing stale status FIFO file #{filename}"
0
- File.unlink(filename) rescue nil
0
- end
0
- end
0
- return result
0
-end
0
-
0
-def process_is_alive?(pid)
0
- begin
0
- Process.kill(0, pid)
0
- return true
0
- rescue Errno::ESRCH
0
- return false
0
- rescue SystemCallError => e
0
- return true
0
- end
0
-end
0
-
0
 def show_status(control_process, format = :text)
0
   begin
0
     text = control_process.status

Comments

    No one has commented yet.