A platform for community discussion. Free, open, simple.
DEV: Check `RUN_PITCHFORK` for explicit "1" value (#37264)
Alan Guo Xiang Tan63023145c2b7
diff --git a/bin/rails b/bin/railsindex 5db3b992db0..aa8b01ab7f3 100755--- a/bin/rails+++ b/bin/rails@@ -10,7 +10,7 @@ if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server") && Process.respoENV["RAILS_LOGS_STDOUT"] ||= "1"- exec File.expand_path(ENV["RUN_PITCHFORK"] ? "pitchfork" : "unicorn", __dir__)+ exec File.expand_path(ENV["RUN_PITCHFORK"] == "1" ? "pitchfork" : "unicorn", __dir__)endAPP_PATH = File.expand_path("../config/application", __dir__)diff --git a/config/unicorn_launcher b/config/unicorn_launcherindex 5a4363fc99e..92955f53b01 100755--- a/config/unicorn_launcher+++ b/config/unicorn_launcher@@ -69,7 +69,7 @@ function on_reopenlogs() {export UNICORN_SUPERVISOR_PID=$$-if [[ -n "$RUN_PITCHFORK" ]]; then+if [[ "$RUN_PITCHFORK" == "1" ]]; thenPITCHFORK_ARGS=()for arg in "$@"; doPITCHFORK_ARGS+=("${arg/unicorn.conf.rb/pitchfork.conf.rb}")@@ -77,7 +77,7 @@ if [[ -n "$RUN_PITCHFORK" ]]; thenfitrap on_exit EXIT-if [[ -z "$RUN_PITCHFORK" ]]; then+if [[ "$RUN_PITCHFORK" != "1" ]]; thentrap on_reload_unicorn USR2 HUPtrap on_reopenlogs USR1unicorn "$@" &