1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

control_cli.rb - all normal output should be to @stdout (#2487)

This commit is contained in:
MSP-Greg 2020-11-17 08:30:08 -06:00 committed by GitHub
parent ae017306b1
commit a7c931af3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -10,6 +10,7 @@
* Bugfixes
* Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
* control_cli.rb - all normal output should be to @stdout (#2487)
* Catch 'Error in reactor loop escaped: mode not supported for this object: r' (#2477)
* Ignore Rails' reaper thread (and any thread marked forksafe) for warning ([#2475])
* Ignore illegal (by Rack spec) response header ([#2439])

View file

@ -96,7 +96,7 @@ module Puma
end
o.on_tail("-V", "--version", "Show version") do
puts Const::PUMA_VERSION
@stdout.puts Const::PUMA_VERSION
exit
end
end
@ -236,14 +236,14 @@ module Puma
sig = CMD_PATH_SIG_MAP[@command]
if sig.nil?
puts "'#{@command}' not available via pid only"
@stdout.puts "'#{@command}' not available via pid only"
return
elsif sig.start_with? 'SIG'
Process.kill sig, @pid
elsif @command == 'status'
begin
Process.kill 0, @pid
puts 'Puma is started'
@stdout.puts 'Puma is started'
rescue Errno::ESRCH
raise 'Puma is not running'
end