diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 1dd37f326d..64df785995 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Distinguish the spawners for different processes [DHH] + * Added -n/--process to script/process/spawner name the process pid (default is dispatch) [DHH] * Namespaced OrderedHash so the Rails implementation does not clash with any others. (fixes #4911) [Julian Tarkhanov] diff --git a/railties/lib/commands/process/spawner.rb b/railties/lib/commands/process/spawner.rb index 76d12dddbf..8b5d56b324 100644 --- a/railties/lib/commands/process/spawner.rb +++ b/railties/lib/commands/process/spawner.rb @@ -14,7 +14,7 @@ def daemonize #:nodoc: end class Spawner - def self.record_pid(name = "spawner", id = Process.pid) + def self.record_pid(name = "#{OPTIONS[:process]}.spawner", id = Process.pid) FileUtils.mkdir_p(OPTIONS[:pids]) File.open(File.expand_path(OPTIONS[:pids] + "/#{name}.pid"), "w+") { |f| f.write(id) } end